简体   繁体   中英

ImportError: couldn't find library

I am encountering these errors frequently when I install python libraries and I'm wondering what I am doing wrong

the current example is the libchromaprint library http://acoustid.org/chromaprint I install it and everything, try to run the python example, get:

    Traceback (most recent call last):
  File "examples/fpwav.py", line 7, in <module>
    import chromaprint
  File "build/bdist.linux-x86_64/egg/chromaprint/__init__.py", line 24, in <module>

ImportError: couldn't find libchromaprint

and then when I check:

find /usr/local/lib/libch*
/usr/local/lib/libchromaprint.so
/usr/local/lib/libchromaprint.so.0
/usr/local/lib/libchromaprint.so.0.1.3

what am I doing wrong?

Python does not use your usual library path. The chromaprint you're looking for should be somewhere like /usr/lib/pymodules/python2.6.

From the python interpreter do:

>>> import sys
>>> sys.path

This will show you the directories python searches for a module.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM