Ubuntu 14.04上的Python3.5虚拟环境 - 加载共享库时出错:libpython3.5m.so.1.0

时间:2017-04-09 17:49:05

标签: python python-3.x ubuntu-14.04 virtualenv

我为python 2.7和python3.5设置了virtualenv,它运行正常但我今天在python3.5虚拟环境上看到了这个问题。

(py_35_env)mypc@mypc-Inspiron-3847:/opt/e360/programs/py_35_env/bin$ python

我收到以下错误

python: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory

以下是我的bin目录中的文件

(py_35_env)mypc @ mypc-Inspiron-3847:/ opt / e360 / programs / py_35_env / bin $ ls -ltr

-rwxrwxr-x 1 mypc mypc 13921 Mar 18 18:43 python3.5
lrwxrwxrwx 1 mypc mypc     9 Mar 18 18:43 python3 -> python3.5
lrwxrwxrwx 1 mypc mypc     9 Mar 18 18:43 python -> python3.5
-rw-rw-r-- 1 mypc mypc  1129 Mar 18 18:43 activate_this.py
-rw-rw-r-- 1 mypc mypc  2476 Mar 18 18:43 activate.fish
-rw-rw-r-- 1 mypc mypc  1263 Mar 18 18:43 activate.csh
-rw-rw-r-- 1 mypc mypc  2207 Mar 18 18:43 activate

我在virtualenv bin目录中添加了指向python的库路径

(py_35_env)mypc@mypc-Inspiron-3847:/opt/e360/programs/py_35_env/bin$ echo $LD_LIBRARY_PATH
:/opt/e360/programs/py_35_env/bin

Python3.4打开正常。

(py_35_env)mypc@mypc-Inspiron-3847:/opt/e360/programs/py_35_env/bin$python3.4
Python 3.4.3 (default, Nov 17 2016, 01:08:31) 
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

这是我的python信息

(py_35_env)mypc@mypc-Inspiron-3847:/opt/e360/programs/py_35_env/bin$ whereis python
python: /usr/bin/python3.4m /usr/bin/python3.4 /usr/bin/python2.7 /usr/bin/python /etc/python3.4 /etc/python2.7 /etc/python /usr/lib/python3.4 /usr/lib/python2.7 /usr/bin/X11/python3.4m /usr/bin/X11/python3.4 /usr/bin/X11/python2.7 /usr/bin/X11/python /usr/local/lib/python3.4 /usr/local/lib/python2.7 /usr/include/python2.7 /usr/share/python /usr/share/man/man1/python.1.gz

请建议我如何修复error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory

的错误

是否存在与符号链接相关的错误?或者没有指向正确的目录

0 个答案:

没有答案