How do you keep installed Python patch versions up to date?

0
0
Asked By MellowCedar42 On

Since the Python install manager was introduced, some developers have switched to it instead of Miniforge or other Python environment managers. However, it doesn't seem obvious how to update already-installed patch versions. For example, I can install Python 3.13.7 even though 3.13.15 is now available, leaving older OpenSSL libraries in the installation and potentially exposing systems to known vulnerabilities. What's the recommended way to update these Python installations while keeping the same major and minor version?

2 Answers

Answered By QuietHarbor17 On

Another option is `uv`. You can specify the Python version in the project configuration or on the command line, and it handles installing and selecting the appropriate interpreter. Keeping the required version with each project can be easier than updating a system-wide installation manually.

Answered By SilverMaple88 On

Use `py install --update`. With no version tags, it checks every Python installation managed by the tool and replaces an installation only when a newer version is available. Keep in mind that updating removes changes made directly to the installation, including globally installed packages, although existing virtual environments should continue to work.

MellowCedar42 -

I found that `pymanager install --update` is the command for updating all installed versions. It does refresh the Python executable, although Python 3.12.10 still appears to include an older OpenSSL version.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.