IPython module import error: /usr/bin/ld: cannot find -lpython2.7. collect2: ld returned 1 exit status

让人想犯罪 __ 提交于 2019-12-07 05:08:28
nouiz

Your python installation is incomplete. When you do:

module load libs/python/2.7.3

information is added to your environment variables to make you use python 2.7.3. But this version doesn't include the development header of python (Theano needs this). Or it doesn't put the right path in your environment.

To debug this, run this before and after running "module load libs/python/2.7.3" to compare what module load does:

env &> BEFORE.txt
module load libs/python/2.7.3
env &> AFTER.txt
diff BEFORE.txt AFTER.txt

Then check the paths added to your env variables and look in those directories. It should have modified the LD_LIBRARY_PATH variable, but it should have done the same modification to LIBRARY_PATH. If it doesn't, do that modification yourself and tell your system admin about this.

This will solve your problem.

Otherwise, use the python 2.6 from the OS, maybe in include the development version.

Otherwise, check if other python versions are available via module.

Lastly, contact your system admin to add the development and shared version of python or install it yourself:

wget -c http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
tar -jxf Python-2.7.6.tar.bz2 
cd Python-2.7.6
./configure --prefix=~/python2.7.6 --enable-shared
make
make install
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!