r/learnpython • • 4h ago

updating Python on macOS

How do you update Python on macOS? I looked it up and from what I can tell, there is no simple command you can enter into the terminal to update it, and you have to instead go to the website https://www.python.org/downloads/ and download and install it manually to update which is inconvenient. There's also the question of removing the old versions you have no intention of using anymore.

I am aware of Homebrew and I do have it for other things I've installed, but I want to try to only use it to download things to my MacBook that I otherwise couldn't. Python can easily be downloaded for mac separately and I want to keep it that way if possible. Is there no update command for the mac terminal to simply update Python?

2 Upvotes

18 comments sorted by

View all comments

9

u/SilentBlueberry2 4h ago

Use a package manager for python with virtual environments, otherwise youre updating the system python, which almost certainly is not what you want to do. Use uv or virtualenvs or conda or pixi, depending on what you need to install.

-2

u/silverknife42 3h ago

otherwise youre updating the system python, which almost certainly is not what you want to do

why not?

5

u/Temporary_Pie2733 3h ago

Theoretically, the system-installed Python is primarily for and tracked by the OS itself, and should not be updated except by official OS updates. You can use it in a read-only capacity, but don’t modify it outside official channels, as theoretically there might be system scripts that depend on the officially installed version.