[英]error while loading shared libraries: libpython2.7.so.1.0 when making virtual env in ubuntu
I use anaconda2. 我使用anaconda2。 After I install virtualenv by run pip install virtualenv
. 通过运行pip install virtualenv
之后,请pip install virtualenv
。 when I run virtualenv test
. 当我运行virtualenv test
。 It shows error: 它显示错误:
New python executable in /home/ztgong/work/virtenvs/test/bin/python
/home/ztgong/work/virtenvs/test/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
ERROR: The executable /home/ztgong/work/virtenvs/test/bin/python is not functioning
ERROR: It thinks sys.prefix is u'/home/ztgong/work/virtenvs' (should be u'/home/ztgong/work/virtenvs/test')
ERROR: virtualenv is not compatible with this system or executable
what causes this problem? 是什么原因导致此问题? can anyone give some advises? 有人可以给些建议吗?
Might be late for this question, but solution present here worked for me. 这个问题可能迟到了,但是这里提出的解决方案对我有用。
Try to find file libpython2.7.so.1.0 尝试找到文件libpython2.7.so.1.0
find / -name libpython2.7.so.1.0 查找/ -name libpython2.7.so.1.0
Then add the resultant directory in file /etc/ld.so.conf. 然后将结果目录添加到文件/etc/ld.so.conf中。 Simply write the directory name into this file. 只需将目录名称写入此文件。
Run Command ldconfig 运行命令ldconfig
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.