This is my environment:
I want to create venv virtual environment by pyvenv
. Unfortunately, I got this error message:
$ pyvenv test
Error: Command '['/root/test/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1
After searching the Internet, people said the module ensurepip
is missing. I checked my Anaconda installation path /opt/anaconda3/lib/python3.5
. There is no ensurepip folder.
Then, on my Windows 10 64-bit, I checked my Anaconda installation path D:\win10\Anaconda3\Lib\
. There is an ensurepip folder! And I can successfully run python -m venv test
to create a venv.
Then, I checked the download Anaconda python archives:
D:\win10\Anaconda3\pkgs\python-3.5.2-0.tar.bz2
on Windows 10
and
/opt/anaconda3/pkgs/python-3.5.2-0.tar.bz2
on CentOS 7.
The one archive on Windows 10 does has a ensurepip subfolder. But the one on CentOS 7 doesn't!
Does anyone know this difference? Is it a bug of Anaconda?