wbolster / plyvel

Plyvel, a fast and feature-rich Python interface to LevelDB
https://plyvel.readthedocs.io/
Other
518 stars 75 forks source link

What does "set the proper environment variables for the compiler and linker" mean? #124

Open rickwierenga opened 3 years ago

rickwierenga commented 3 years ago

I got the following error when trying to import plyvel:

ImportError: dlopen(.../plyvel/_plyvel.cpython-37m-darwin.so, 2): Symbol not found: __ZTIN7leveldb10ComparatorE

The docs mention "Install LevelDB or set the proper environment variables for the compiler and linker". What does "proper" mean? I installed leveldb with brew install leveldb and already reinstalled plyvel. I'm on a Mac if it matters.

wbolster commented 3 years ago

i think you need to recompile plyvel (remove your pip cache first). see also the other open issues about osx

rickwierenga commented 3 years ago

I tried reinstalling leveldb and plyvel, but that doesn't help. I keep getting the same error. I checked all previous macOS issues, but none of the solutions (if any were mentioned) worked either. Perhaps it's an issue with leveldb 1.23 and 1.22 will work (as mentioned here) or when the package is upgraded to work with the latest version.

wbolster commented 3 years ago

plyvel should work with both. make sure you (re)compile against the installed version. if you recompile you should see compiler output, not a locally cached wheel. did you try removing the pip cache first?

liviaerxin commented 3 years ago

I tried reinstalling leveldb and plyvel, but that doesn't help. I keep getting the same error. I checked all previous macOS issues, but none of the solutions (if any were mentioned) worked either. Perhaps it's an issue with leveldb 1.23 and 1.22 will work (as mentioned here) or when the package is upgraded to work with the latest version.

I also test compile both leveldb and plyvel on OSX. After that, python3 -c "import plyvel" using leveldb 1.23 will throw the same error,

ImportError: dlopen(/Users/siyao/Documents/python-packages/plyvel/plyvel/_plyvel.cpython-37m-darwin.so, 2): Symbol not found: __ZTIN7leveldb10ComparatorE

However, leveldb 1.21 is ok.

liviaerxin commented 3 years ago

I get leveldb 1.23 to work, see my post at https://github.com/wbolster/plyvel/issues/114#issuecomment-833260224