我在 Windows 周年版 Linux 子系统 (WSL) 上使用 Anaconda 4.1.1 安装了 Python 3.5.2,它或多或少是嵌入式 Ubuntu 14.04.5 LTS。
我使用以下方法安装了 virtualenv:
pip install virtualenv
然后我尝试在里面创建一个虚拟环境~/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
很容易假设这只是一个 WSL 问题,但到目前为止一切正常,我在 Ubuntu 上看到过类似的错误报告。知道问题是什么吗?