Skip to main content

upgrade pip and setuptools versions used by venv

Project description

https://sourceforge.net/p/upgrade-ensurepip/code/ci/default/tree/_doc/_static/license.svg?format=raw https://sourceforge.net/p/upgrade-ensurepip/code/ci/default/tree/_doc/_static/pypi.svg?format=raw https://sourceforge.net/p/oitnb/code/ci/default/tree/_doc/_static/oitnb.svg?format=raw https://sourceforge.net/p/ryd/code/ci/default/tree/_doc/_static/ryd.svg?format=raw

Once you find that:

/your/installed/version/bin/python3 -m venv /some/venv

followed by:

/some/venv/bin/pip install some_package

gives a message that there is an update for pip, this package can update the wheel files used by ensurepip (pip, setuptools) to the latest versions available on pypi, and get rid of this message (at least to the next upgrade).

You can do this upgrade by running:

/your/installed/version/bin/python3 -m upgrade_ensurepip

In order to be able to use the above command, you either have to install the package using something like:

/your/installed/version/bin/pip install --disable-pip-version-check upgrade_ensurepip

or alternatively you can to make sure the file upgrade_ensurepip.py from that package is in your current directory.

Without options upgrade_ensurepip checks the JSON information on the pacakage, downloads the wheel (to memory) if there is a newer version and does a check against the sha256 is made before saving the newly downloaded wheels to disc.

If started With the option --pip, the pip “living” in the same directory as the Python executable is used to first search for the package to get the latest version number, then pip is used to download the wheel for that version. This is somewhat slower, but as pip should follow any instructions in your ~/.config/pip/pip.conf, including upgrading from local repositories.

After finding and downloading newer versions, using one of the above methods, the /your/installed/version/lib/pythonX.Y/ensurepip/__init__.py file is updated as it hard-codes the versions of the wheels used. Before changing, a backup of the original is made if such a backup does not yet exist.

As old wheels are preserved, only backup file __init__.py.org located under /your/installed/version/lib/pythonX.Y/ensurepip/ needs to be copied back in case you encounter any problems.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

upgrade_ensurepip-0.2.0.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

upgrade_ensurepip-0.2.0-py2.py3-none-any.whl (6.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file upgrade_ensurepip-0.2.0.tar.gz.

File metadata

  • Download URL: upgrade_ensurepip-0.2.0.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.2

File hashes

Hashes for upgrade_ensurepip-0.2.0.tar.gz
Algorithm Hash digest
SHA256 780bfcea936b18500e5e9f86d6af0f6af9d4b616dfb4cbebe45564297f5f9970
MD5 3174c73e678f08b96afbb925c5f271ec
BLAKE2b-256 0f409ab16cea92ced944f7fe0808eab3218bf315cb4ebe259db8a7d7c3767408

See more details on using hashes here.

File details

Details for the file upgrade_ensurepip-0.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: upgrade_ensurepip-0.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.2

File hashes

Hashes for upgrade_ensurepip-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 14808b049853c197f8510ee273a2be617a778e9473bcf9607d4b7c2a86f30ed4
MD5 163e818ae134296e064f2af0df7d8394
BLAKE2b-256 47982b99bbb7c4c22206a38abe26be0fd6ba57f0e64c541b0d40725dbbde675f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page