virtualenv hanging forever pythonanywhere
<p>I am trying to follow this <a href="https://tutorial.djangogirls.org/en/deploy/" rel="nofollow">tutorial</a> to get a django application up on pythonanywhere, but when trying to create a virtual environment using  </p>

<pre><code> virtualenv --python=python3.5 myvenv
</code></pre>

<p>The console hangs</p>

<p>I have done this before a while ago and I remember it was all quite painless but when running this command the console is just hanging and I eventually get put in the tarpit. When I interrupt the process I get some errors around Python 2.7  </p>

<pre><code>virtualenv --python=python3.5 myvenv
Running virtualenv with interpreter /usr/bin/python3.5
Using base prefix '/usr'
New python executable in /home/username/myvenv/bin/python3.5
Also creating executable in /home/username/myvenv/bin/python
Traceback (most recent call last):
  File "/usr/local/bin/virtualenv", line 11, in &lt;module&gt;
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 669, in main
Traceback (most recent call last):
    raise SystemExit(popen.wait())
  File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 2327, in &lt;module&gt;
  File "/usr/lib/python2.7/subprocess.py", line 1376, in wait
pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
  File "/usr/lib/python2.7/subprocess.py", line 476, in _eintr_retry_call
    return func(*args)
KeyboardInterrupt
    main()
  File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 711, in main
    symlink=options.symlink)
  File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 944, in create_environment
    download=download,
  File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 900, in install_wheel
    call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
  File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 767, in call_subprocess
    line = stdout.readline()
KeyboardInterrupt
</code></pre>

<p>Not sure if these relate to anything or if they are just because the interrupt.</p>

<p>General practice is to reference the python binary directly, run virtualenv as a module, and specify the directory in which to place the virtualenv. For your example above:</p>

<pre><code>/path/to/python/bin/python3.5 -m virtualenv myvenv
</code></pre>

<p>This will create the virtual environment in myvenv, running python3.5. Note: your base install of python3.5 must have virtualenv library installed (either through pip or source).</p>

<p>Hope this helps! :)</p>

python virtualenv pythonanywhere