简体   繁体   English

加载共享库时出错:在ubuntu中制作虚拟环境时,libpython2.7.so.1.0

[英]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. 这个问题可能迟到了,但是这里提出的解决方案对我有用。

  1. 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

  2. Then add the resultant directory in file /etc/ld.so.conf. 然后将结果目录添加到文件/etc/ld.so.conf中。 Simply write the directory name into this file. 只需将目录名称写入此文件。

  3. Run Command ldconfig 运行命令ldconfig

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 docker-compose “/usr/local/bin/python: error while loading shared libraries: libpython3.8.so.1.0:”时出错 - Error when docker-compose “/usr/local/bin/python: error while loading shared libraries: libpython3.8.so.1.0: ” Python3.7:加载共享库时出错:libpython3.7m.so.1.0 - Python3.7: error while loading shared libraries: libpython3.7m.so.1.0 Docker:libpython2.7.so.1.0:无法打开共享对象文件:没有这样的文件或目录 - Docker: libpython2.7.so.1.0: cannot open shared object file: No such file or directory libpython2.7.so.1.0:无法打开共享对象文件:没有这样的文件或目录 - libpython2.7.so.1.0: cannot open shared object file: No such file or directory 在Python 2.7.13 Heroku dynos上缺少libpython2.7.so.1.0 - Missing libpython2.7.so.1.0 on Python 2.7.13 Heroku dynos yum未找到libpython2.7.so.1.0()(64bit) - libpython2.7.so.1.0()(64bit) not found by yum python:加载共享库时出错:libpython3.4m.so.1.0:无法打开共享对象文件:没有这样的文件或目录 - python: error while loading shared libraries: libpython3.4m.so.1.0: cannot open shared object file: No such file or directory 加载共享库时出现 Python 错误:libpython3.5m.so.1.0:无法打开共享对象文件:没有这样的文件或目录 - Python error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory 错误加载 Python 库 libpython3.6m.so.1.0 pyinstaller Ubuntu Python - Error loading Python lib libpython3.6m.so.1.0 pyinstaller Ubuntu Python 在制作二进制文件时,PyInstaller找不到libpython2.7.so? - PyInstaller cannot find libpython2.7.so when making binary?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM