macOS: error '/usr/lib/libs2.0.dylib' (no such file) after install
- Dominant language
- C++
- Stars
- 2.7k
- Forks
- 357
- Avg merge
- 11h 4m
- Merged PRs (30d)
- 1
Description
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
import pywraps2 as s2
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pywraps2.py", line 15, in
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?
Contributor guide
Assessment
This issue has not been assessed yet.