wbolster / plyvel

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

wrong lib path on OSX #33

Closed medecau closed 10 years ago

medecau commented 10 years ago

I'm getting an error when loading plyvel.

darky:code medecau$ python
Python 2.7.6 (default, May 14 2014, 21:37:36) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import plyvel
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/plyvel/__init__.py", line 6, in <module>
    from ._plyvel import (  # noqa
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/plyvel/_plyvel.so, 2): Library not loaded: /usr/local/opt/leveldb/lib/libleveldb.dylib.1
  Referenced from: /usr/local/lib/python2.7/site-packages/plyvel/_plyvel.so
  Reason: image not found
>>> 

I have installed leveldb using brew and these are the available libleveldb files.

darky:levelzero medecau$ ls /usr/local/opt/leveldb/lib/
libleveldb.1.15.dylib   libleveldb.1.dylib  libleveldb.a        libleveldb.dylib

If I manually create a link from /usr/local/opt/leveldb/lib/libleveldb.dylib to /usr/local/opt/leveldb/lib/libleveldb.dylib.1 the import error goes away.

I tried to add another link to the brew formula for leveldb but it was as I agree not accepted. (See: https://github.com/Homebrew/homebrew/pull/29263)

When needs to be done in order to change plyvel from using /usr/local/opt/leveldb/lib/libleveldb.dylib.1 to /usr/local/opt/leveldb/lib/libleveldb.dylib or even /usr/local/opt/leveldb/lib/libleveldb.1.dylib?

wbolster commented 10 years ago

Sorry, I can't help you with this (I don't use a Mac). There has been a similar report recently: maybe #30 can give you some more insight?

medecau commented 10 years ago

Can you change the file from libleveldb.dylib.1 to libleveldb.1.dylib?

wbolster commented 10 years ago

I can't change anything, since I don't generate that file. It's setuptools that does the compilation and installation step. I would be happy to help, if I would know what to do. :)

medecau commented 10 years ago

Okay, I guess this issue can be closed.