user2378916
user2378916

Reputation: 11

linking to python library using EPD Canopy

Summary: I'm trying to install the theano python package, and the theano install can't find "-lpython2.7" in my EPD Canopy installation.

More details: Recently I installed the Enthought EPD Canopy python distribution (64-bit academic) in OS X 10.6.8. Next I installed pip via "easy_install pip".

Next I installed Theano via "sudo pip install theano". The install looks OK, but then python -c "import theano" fails. The full output is at https://gist.github.com/anonymous/5548936, but it seems like the main point is:

Problem occurred during compilation with the command line below:

g++ -dynamiclib -g -D NPY_ARRAY_ENSURECOPY=NPY_ENSURECOPY -D NPY_ARRAY_ALIGNED=NPY_ALIGNED -D NPY_ARRAY_WRITEABLE=NPY_WRITEABLE -D NPY_ARRAY_UPDATE_ALL=NPY_UPDATE_ALL -D NPY_ARRAY_C_CONTIGUOUS=NPY_C_CONTIGUOUS -D NPY_ARRAY_F_CONTIGUOUS=NPY_F_CONTIGUOUS -fPIC -undefined dynamic_lookup -m64 -I/Users/rkeisler/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include -I/Applications/Canopy.app/appdata/canopy-1.0.0.1160.macosx-x86_64/Canopy.app/Contents/include/python2.7 -o /Users/rkeisler/.theano/compiledir_Darwin-10.8.0-x86_64-i386-64bit-i386-2.7.3/lazylinker_ext/lazylinker_ext.so /Users/rkeisler/.theano/compiledir_Darwin-10.8.0-x86_64-i386-64bit-i386-2.7.3/lazylinker_ext/mod.cpp -L/Applications/Canopy.app/appdata/canopy-1.0.0.1160.macosx-x86_64/Canopy.app/Contents/lib -lpython2.7

===============================

ld: library not found for -lpython2.7 collect2: ld returned 1 exit status

I've had some discussions with the theano google group, and the main message I get is to look for "libpython2.7.so", which I can't find. I checked /Users/rkeisler/Library/Enthought/Canopy_64bit/User/lib/. Inside is python2.7/os.py and python2.7/site-packages, but no "libpython*" files.

I also did a more thorough check for libpython* files. The only things I could find were:

/usr/lib/python2.5/config/libpython2.5.a
/usr/lib/python2.6/config/libpython2.6.a
/usr/lib/libpython.dylib
/usr/lib/libpython2.5.dylib
/usr/lib/libpython2.6.dylib

Finally, on the EPD Canopy package list, I see "libpython" listed. However, when I try to install libpython using the Canopy package manager, "libpython" doesn't appear. It's not an available package. I'm not sure where to go from here.

Upvotes: 1

Views: 1115

Answers (1)

nouiz
nouiz

Reputation: 5071

Following @RobertKern@ information, it is now fixed in the development version of Theano.

To update to the development version, do:

pip -U --no-deps git+git://github.com/Theano/Theano.git

Upvotes: 0

Related Questions