How to update Python which download from official website?

I'm mac user, and I downloaded Python from the offcial website. What if I want to update Python, what should I do? I also installed the Java JDK from offcial website, both of them are .pkg, can someone tell me how to update them if they can be updated?


Solution 1:

If you have homebrew installed you can type in the terminal:

brew install python3

Otherwise you can just download it again from the website and install it.

If you don't know which version of python you have installed type python --version or python3 --version. Similar questions have been answered on SO and other websites.