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

Reason: tried: '/usr/lib/libs2.0.dylib' (no such file) #275

Open
francesco98 opened this issue Sep 30, 2022 · 1 comment
Open

Reason: tried: '/usr/lib/libs2.0.dylib' (no such file) #275

francesco98 opened this issue Sep 30, 2022 · 1 comment

Comments

@francesco98
Copy link

Hello,

I'm trying to compile the library to be used in python, but I'm receiving an error while trying to import it with import pywraps2 as s2:

Traceback (most recent call last): File "/Users/franpo/Projects/s2-geometry/Projects/test.py", line 5, in <module> import pywraps2 as s2 File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pywraps2.py", line 15, in <module> import _pywraps2 ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/_pywraps2.so, 0x0002): Library not loaded: '@rpath/libs2.0.dylib' Referenced from: '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/_pywraps2.so' Reason: tried: '/usr/lib/libs2.0.dylib' (no such file)

I successfully installed the library using the following commands:
cmake -DCMAKE_CXX_STANDARD=14 -DCMAKE_PREFIX_PATH=~/libraries/abseil -DOPENSSL_ROOT_DIR=/opt/homebrew/Cellar/openssl@3/3.0.5 -DWITH_PYTHON=ON
sudo make install

In my opinion the problem is that on my Mac M1 the library has been installed in /usr/local/lib/libs2.dylib, but Python is trying to load it from /usr/lib/libs2.0.dylib. I tried with export LD_LIBRARY_PATH=/usr/local/lib, but it does not change anything..

Do you have any idea?

@aliwo
Copy link

aliwo commented Oct 16, 2022

Hi, I'm struggling with building too, and now I'm using docker image + pycharm remote interpreter
(https://github.com/bjlittle/docker-s2geometry)
(I thought this might be helpful until you find the solution)

Cheers :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants