About Updating Python

How to upgrade python to a newer version without direct downloading from the website?? I observe that many programming languages/applications have either “Check for Updates” or Automatic Updating feature so such types of features are available in Python??

Hi Yash,

I have never seen this for programming languages. When you are programming an application, you generally want to support very specific versions of the language (in a certain range). An unwanted update might break your program, so you’d not ask for it to be done automatically.

Python can be installed in various locations and embedded in various ways, depending on what you use it for. It cannot guess how to update itself I think, but if you have installed it through a package manager for example (e.g., APT, DNF, HomeBrew), that can update it. Anaconda also supports this (conda install python==3.9.1 for instance). Ultimately, this is the responsibility of the installation environment, not the interpreter itself. If you provide details about your environment, we might be able to help you better.

Actually, both Rust and Deno have such a feature.

$ deno upgrade
Looking up latest version
Found latest version 1.9.2
Checking https://github.com/denoland/deno/releases/download/v1.9.2/deno-x86_64-apple-darwin.zip
Download has been found
Deno is upgrading to version 1.9.2
Archive:  /var/folders/_3/c_b127r13453gn_v3sv95vm40000gn/T/.tmpbg7sKQ/deno..zip
  inflating: deno                    
Upgraded successfully

$ rustup update

  stable-x86_64-apple-darwin updated - rustc 1.52.1 (9bc8c42bb 2021-05-09) (from rustc 1.49.0 (e1884a8e3 2020-12-29))

info: cleaning up downloads & tmp directories

Thanks. Apparently I am more old-fashioned than I thought…

1 Like

:slight_smile: However, such a feature is probably out of the question for Python: