tutorial
tutorial copied to clipboard
Can't use `python3 -m venv myvenv` on MacOS using Anaconda
Issue description
When trying to python3 -m venv myvenv on a Mac where Python3 has been installed with Anaconda, we get the following error:
Error: Command '['/home/.../venv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
The solution is to create a virtualenv without pip, activate the venv and then install pip inside.
Maybe we should add a troubleshooting tip about it in the tutorial.
Language
Python
Operating system
Mac OS / Anaconda
Hello @T4m
For the case of Anaconda, you can simply use
conda create -n yourenvname python=x.x anaconda