Having trouble getting the chromaprint python example to work

601 views
Skip to first unread message

Endre

unread,
Oct 12, 2011, 2:14:29 PM10/12/11
to Acoustid
Hi,
I am no linux/python guru and this is a frequent problem for me.
I downloaded chromaprint built the library with cmake , ran the cmake
test successfully, installed the python wrapper, and when I run the
example I 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

Although according to:

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

it should be installed.
Are there any ways to diagnose this scenario so it can be avoided in
the future?
thanks

Lukáš Lalinský

unread,
Oct 12, 2011, 2:30:45 PM10/12/11
to acou...@googlegroups.com
On Wed, Oct 12, 2011 at 8:14 PM, Endre <galacz...@gmail.com> wrote:
> ImportError: couldn't find libchromaprint
>
> Although according to:
>
> find /usr/local/lib/libch*
> /usr/local/lib/libchromaprint.so
> /usr/local/lib/libchromaprint.so.0
> /usr/local/lib/libchromaprint.so.0.1.3
>
> it should be installed.
> Are there any ways to diagnose this scenario so it can be avoided in
> the future?

I believe the problem is that /usr/local/lib is not in the linker
search path on your OS. You should be able to use something like this
temporarily:

export LD_LIBRARY_PATH=/usr/local/lib

To set it permanently, you can add /usr/local/lib to
/etc/ld.so.conf.d/ (/etc/ld.so.conf, depending on the OS):

echo /usr/local/lib > /etc/ld.so.conf.d/local.conf
ldconfig

Lukas

Endre

unread,
Oct 13, 2011, 4:07:50 AM10/13/11
to Acoustid
I appreciate your prompt response. The solution worked, I look forward
to experimenting with this lib.
Thank you

On Oct 12, 8:30 pm, Lukáš Lalinský <lalin...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages