简体   繁体   English

Anaconda Python virtualdev在Windows的Linux子系统上找不到libpython3.5m.so.1.0(Ubuntu 14.04)

[英]Anaconda Python virtualdev can't find libpython3.5m.so.1.0 on Windows Subsystem for Linux (Ubuntu 14.04)

I installed Python 3.5.2 using Anaconda 4.1.1 on the Windows Anniversary Edition Linux Subsystem (WSL), which is more or less embedded Ubuntu 14.04.5 LTS. 我在Windows Anniversary Edition Linux子系统(WSL)上使用Anaconda 4.1.1安装了Python 3.5.2,它或多或少嵌入了Ubuntu 14.04.5 LTS。

I installed virtualenv using: 我使用以下方法安装了virtualenv:

pip install virtualenv

Then I tried to create a virtual environment inside ~/temp : 然后我尝试在~/temp创建一个虚拟环境:

user@host:~$ virtualenv ~/temp/test
Using base prefix '/home/user/anaconda3'
New python executable in /home/user/temp/test/bin/python
/home/user/temp/test/bin/python: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory
ERROR: The executable /home/user/temp/test/bin/python is not functioning
ERROR: It thinks sys.prefix is '/home/user' (should be '/home/user/temp/test')
ERROR: virtualenv is not compatible with this system or executable

It's easy to assume that this is just a WSL issue, but everything else was working so far, and I've seen similar errors reported on Ubuntu. 很容易假设这只是一个WSL问题,但到目前为止其他所有工作都有效,而且我在Ubuntu上看到了类似的错误报告。 Any idea what the problem is? 知道问题是什么吗?

I have not experienced the same issue or tried to replicate the WSL environment. 我没有遇到过同样的问题,或者试图复制WSL环境。 But usually when something similar happens with other libraries it is just likely to be a poorly configured environment. 但通常当其他库发生类似情况时,它很可能是一个配置不当的环境。 You have to checkout your library path: 你必须签出你的图书馆路径:

echo $LD_LIBRARY_PATH

And make sure the directory that holds libpython is there. 并确保包含libpython的目录存在。 If not: 如果不:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/the/py/lib/dir

Add this last line to your .bash_profile or .bashrc to make it permanent. 将最后一行添加到.bash_profile.bashrc以使其永久化。

mine solution : 我的解决方案

open a shell 打开一个壳

cd
vim .bashrc

add a line 添加一行

export LD_LIBRARY_PATH=~/anaconda3/lib

暂无
暂无

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

相关问题 Python3.5 导入错误:libpython3.5m.so.1.0:无法打开共享对象文件:没有这样的文件或目录 - Python3.5 ImportError: libpython3.5m.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 Pyinstaller:无法打开共享对象 libpython3.5m.so.1.0 - Pyinstaller: Cannot open shared object libpython3.5m.so.1.0 Python3.3在Linux(pip-3.3)中找不到libpython3.3m.so - Python3.3 can't find libpython3.3m.so in linux (pip-3.3) 错误加载 Python 库 libpython3.6m.so.1.0 pyinstaller Ubuntu Python - Error loading Python lib libpython3.6m.so.1.0 pyinstaller Ubuntu Python Python 无法在适用于 Linux 的 Windows 子系统中找到文件 - Python can't find file in Windows Subsystem for Linux 与从python 3.5.2源构建的libpython3.5m.so相比,libpython3.so是什么? - What is libpython3.so compared with libpython3.5m.so built from python 3.5.2 source? pyinstaller 错误:OSError:找不到 Python 库:libpython3.4mu.so.1.0、libpython3.4m.so.1.0、libpython3.4.so.1.0 - pyinstaller error: OSError: Python library not found: libpython3.4mu.so.1.0, libpython3.4m.so.1.0, libpython3.4.so.1.0 使用Anaconda Python 3.5在Ubuntu 14.04上安装GDAL的ImportError - ImportError installing GDAL on Ubuntu 14.04 with Anaconda Python 3.5 我无法在Ubuntu 14.04中安装Anaconda - I can't install Anaconda in Ubuntu 14.04
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM