I'm working in Amazon's Cloud9.
ec2-user:~/environment/flask_init $ python -V
Python 2.7.14
ec2-user:~/environment/flask_init $ virtualenv -p python3 venv
Running virtualenv with interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/ec2-user/environment/flask_init/venv/bin/python3
Also creating executable in /home/ec2-user/environment/flask_init/venv/bin/python
Installing setuptools, pip, wheel...done.
ec2-user:~/environment/flask_init $ source venv/bin/activate
(venv) ec2-user:~/environment/flask_init $ python -V
Python 2.7.14
Why is the virtual environment not using Python 3?
Please note that this question is not a duplicate of this one. The issue was specifically to do with the way the Cloud 9 environment sets up Python alias.
virtualenv -p path/to/python3 venv
– Clavius/usr/bin/python3
– Anglocatholic-v
flag and paste the logs into the question? – Ophitepython3 -v
and if the output isPython 3.x
then try runningpython3 -m virtualenv venv
– Claviuspython
? Can you try commands:which python
;$(which python) --version
? – Coactive