I'm trying to use python3.6 -m venv test
directly in PythonAnywhere to create a virtualenv. I wanted to use this method as I believe it is more portable to other environments where virtualenvwrapper might not be set up.
When I run the command (in a PA environment that has been upgraded to use Python 3.6) I get the following error.
12:34 ~ $ python3.6 -m venv test
Error: Command '['/home/dpottsagilisys/test/bin/python3.6', '-Im', 'ensurepip',
'--upgrade', '--default-pip']' returned non-zero exit status 1.
PythonAnywhere dev here: this appears to be a bug in Ubuntu 14.04 (and apparently 15.04), which we were based on when this question was originally asked.
This Ask Ubuntu question has various suggestions; here's one that I've made 100% certain works on PythonAnywhere:
python3.6 -m venv --without-pip test
source test/bin/activate
curl https://bootstrap.pypa.io/get-pip.py | python
deactivate
source test/bin/activate
[Update 28 June 2018: Switching to a 16.04 image is, coincidentally, what we're working on right now.]
[Update 30 September 2018: the 16.04 image is now live for new PythonAnywhere accounts]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With