Reputation: 6116
I am trying to create a virtual environment as:
python3.6 -m venv env
Error: Command '['/Users/jonathan/temp/django-example-channels/env/bin/python3.6', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
My googling on the problem brings up many similar cases but all say they are on Ubuntu and Ubuntu related. Me I am on a Mac so I am thinking this is something else?
Don't really know what would be helpful but here is version information at least:
$ python3.6 --version
Python 3.6.0 :: Anaconda 4.3.1 (x86_64)
Upvotes: 0
Views: 4509
Reputation: 6116
So, it seems Anaconda was the problem. First virtualenv needed to be installed:
conda install virtualenv
I actually had to ru nthat multiple times before I got: # All requested packages already installed.
. Don't know what's up with that, maybe my conda was to unupdated...
Then it still didn't work to create an environment as:
$ python3.6 -m venv env
Error: Command '['/Users/jonathan/temp/django-example-channels/env/bin/python3.6', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
However $ python3.6 -m venv env
actually seems to have worked.
Upvotes: 2
Reputation: 156
This guide might be helpful in setting up and using a virtual environment in python3 with a Mac. In general though, I don't think you need to include the .6
in command. Just using $ python3 -m venv path/to/virtual/env
should work, as shown in the official docs
Upvotes: 0