Anaconda Python virtualdev can't find libpython3.5m.so.1.0 on Windows Subsystem for Linux (Ubuntu 14.04)
<p>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.</p>

<p>I installed virtualenv using:</p>

<pre><code>pip install virtualenv
</code></pre>

<p>Then I tried to create a virtual environment inside <code>~/temp</code>:</p>

<pre><code>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
</code></pre>

<p>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. Any idea what the problem is?</p>

<p>I have not experienced the same issue or tried to replicate the WSL environment. 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:</p>

<pre><code>echo $LD_LIBRARY_PATH
</code></pre>

<p>And make sure the directory that holds <code>libpython</code> is there. If not:</p>

<pre><code>export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/the/py/lib/dir
</code></pre>

<p>Add this last line to your <code>.bash_profile</code> or <code>.bashrc</code> to make it permanent.</p>

python linux ubuntu virtualenv wsl