Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mac OS X] LIBLINEAR library not found #8

Open
louieQ opened this issue Mar 19, 2021 · 1 comment
Open

[Mac OS X] LIBLINEAR library not found #8

louieQ opened this issue Mar 19, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@louieQ
Copy link

louieQ commented Mar 19, 2021

After performing the setup steps described in README.md, I am not able to run the proposed example for polarity detection.

Context

Operating System: MacOS Big Sur (v11.2.3)

Process

The git lfs and java 8+ requirements were already satisfied on my machine. Therefore, I only had to perform the following steps to complete the setup:

  1. Install a Python 3.7 virtual environment
    python3.7 -m venv env
    
  2. Install the dependencies declared in requirements.txt
    pip install -r requirements.txt
    

Finally, I issued the example command:

sh classification.sh -i Sample.csv -d sc

Expected result

I expect to get a .csv file containing the sentiment predictions for the sentences in Sample.csv.

Current result

At first, the script appears to be running smoothly, producing the following output:

Loading DSM ...
mar 19, 2021 7:07:57 PM di.uniba.it.tdsm.vectors.MemoryVectorReader init
INFO: Loading vector store: /Users/luigiquaranta/Developer/collab/pySenti4SD/./java/dsm.bin
mar 19, 2021 7:08:08 PM di.uniba.it.tdsm.vectors.MemoryVectorReader init
INFO: Total vectors/dimension: 346.197/600
Vector dimension: 600
Terminato

Then, it raises the following exception:

Traceback (most recent call last):
  File "/Users/luigiquaranta/Developer/collab/pySenti4SD/python/core/liblinear_multicore/liblinear.py", line 30, in <module>
    liblinear = CDLL(path.join(dirname, 'so/liblinear.so.3'))
  File "/opt/anaconda3/lib/python3.7/ctypes/__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Users/luigiquaranta/Developer/collab/pySenti4SD/python/core/liblinear_multicore/so/liblinear.so.3, 6): no suitable image found.  Did find:
	/Users/luigiquaranta/Developer/collab/pySenti4SD/python/core/liblinear_multicore/so/liblinear.so.3: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
	/Users/luigiquaranta/Developer/collab/pySenti4SD/python/core/liblinear_multicore/so/liblinear.so.3: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./python/classification_task.py", line 11, in <module>
    from core.classification import Classification
  File "/Users/luigiquaranta/Developer/collab/pySenti4SD/python/core/classification.py", line 15, in <module>
    from liblinearutil import *
  File "/Users/luigiquaranta/Developer/collab/pySenti4SD/python/core/liblinearutil.py", line 6, in <module>
    from liblinear_multicore.liblinear import *
  File "/Users/luigiquaranta/Developer/collab/pySenti4SD/python/core/liblinear_multicore/liblinear.py", line 38, in <module>
    raise Exception('LIBLINEAR library not found.')
Exception: LIBLINEAR library not found.
@louieQ louieQ added the bug Something isn't working label Mar 19, 2021
@himarange
Copy link

Same.. did you manage to find a fix? I'm now trying to run it on my old windows :sad:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants