[issue30628] why venv install old pip?

Emily Morehouse report at bugs.python.org
Tue Jun 13 00:30:14 EDT 2017


Emily Morehouse added the comment:

You're certainly right. venv uses ensurepip to install pip when creating a virtual environment and does not access the internet/upgrade any packages. ensurepip was specifically designed to use the bundled version of setuptools. The bundled version of setuptools was up to date as of the final Python 3.6.0 beta, though it seems like it could be due for an upgrade.

For now, you can either run `pip install --upgrade setuptools` after activating your environment (recommended) or give your environment access to your local site packages that has the upgraded setuptools using `python3 -m venv foo --system-site-packages` (not recommended, as this will include ALL global packages you have installed). Alternatively, virtualenv (https://virtualenv.pypa.io/en/stable/) maintains an updated version of setuptools more frequently, though it must be installed as an additional package.

It should also be noted that wheel is not installed by venv and must also be installed after the environment creation if needed.

----------
nosy: +ncoghlan

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30628>
_______________________________________


More information about the Python-bugs-list mailing list