tutorial icon indicating copy to clipboard operation
tutorial copied to clipboard

Can't use `python3 -m venv myvenv` on MacOS using Anaconda

Open T4m opened this issue 7 years ago • 1 comments

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

T4m avatar Sep 02 '18 09:09 T4m

Hello @T4m For the case of Anaconda, you can simply use conda create -n yourenvname python=x.x anaconda

idilsulo avatar Nov 14 '18 17:11 idilsulo