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.1.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

upgrade_ensurepip-0.2.1-py2.py3-none-any.whl (7.0 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: upgrade_ensurepip-0.2.1.tar.gz
  • Upload date:
  • Size: 16.4 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.1.tar.gz
Algorithm Hash digest
SHA256 72372fc7adc59557bb7f9337ee81828d5f1d3df46f7653b920a1dfe387c37d7a
MD5 8435b5e5b36fe43c3baee61bfba91279
BLAKE2b-256 4dab14cade90fffc8e7f3d80f7c168b740c741562fc8128c53045f7415b903b8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: upgrade_ensurepip-0.2.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.0 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.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c2ced6130634faef08372d195c33edf44f14ea32bdb33ab592517149905879a6
MD5 645f7c7242338f6aeb32e748a7a2ea9e
BLAKE2b-256 b49b09c7c6e09c5481ab902699e83d262de2d264fccbbc3188355b8873fda61a

See more details on using hashes here.

Supported by

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