Python virtual environment creation

I am unable to create a Python virtual environment with “venv” (3.8.1).

$ python -m venv test-env
Error: Command ‘[’/home/bob/test-env/bin/python’, ‘-Im’, ‘ensurepip’, ‘–upgrade’, ‘–default-pip’]’ returned non-zero exit status 1.

“python -m venv test-env” creates the environment in the proper directory, but packages cannot be installed in it.

Virtualenv works. A search of Python bundles lists virtualenv, but not venv, at least not obviously. The apparent absence of venv is not important, but I am curious why this is the case.

Ah this is a bug due to how we were handling excluding the bundled pip. I have forgotten a bit about why we did it this way so I’m going to try and see if the obvious fix of building with --without-ensurepip works.

I normally use virtualenv and it does work around the issue pointed out by William.