Anaconda Python virtualdev cannot find libpython3.5m.so.1.0 in the Windows subsystem for Linux (Ubuntu 14.04)

I installed Python 3.5.2 using Anaconda 4.1.1 on the Linux Anniversary Edition (WSL) subsystem, which is more or less built into Ubuntu 14.04.5 LTS.

I installed virtualenv using:

pip install virtualenv

Then I tried to create a virtual environment inside ~/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 is easy to assume that this is only a WSL problem, but everything else has worked so far, and I have seen similar errors reported in Ubuntu. Any idea what the problem is?

+4
source share
2 answers

WSL. , - , , , . :

echo $LD_LIBRARY_PATH

, , libpython, . :

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

.bash_profile .bashrc, .

+13

:

cd
vim .bashrc

export LD_LIBRARY_PATH=~/anaconda3/lib
0

Source: https://habr.com/ru/post/1653478/


All Articles