As we know that, Python is a remarkable and popular programming language in the market. Beginners and longtime developers alike widely use it. The latest versions of Mac OS comes with Python 2.7.x installed or Python 2.6.1 if a previous version of Mac OS X, but some of the users Python are want to update Python in Mac OS in the latest version for example- Python 3.6.5.
In this article, we will discuss how you can get an updated Python 3 installation on your Mac with the help of two different ways to quickly and easily install Python 3 onto a Mac. The methods are given below:-
Steps to Install the Updated Python 3 in Mac OS?
It is the simplest way to install Python 3, and you can use it by using the Python package installer from python.org.
- To do this, you need to go the Python.org downloads page and then download the updated Python installer package from here.
- Then, you need to run the Python installer package and install the Python 3 on your Mac.
Please note- Python 3.6.x will requires at-least 100mb of disk space to install. The installation process is very easy, and you will have Python 3.x alongside Python 2.x on the Mac.
- After completing the Python 3 installation process, you will see a Python 3 folder in your Applications directory of your Mac.
- Besides this, you will find the simple IDE that is called IDLE within the or Applications/MacPython3/ directory.
- It will provide you the same Python IDE you’d face if you ran ‘python3’ at the command prompt in Terminal.
The second way to Install the Updated Python 3 using Homebrew in Mac OS:-
You can also install the Python 3.x on a Mac using Homebrew, and it is an effective way as a Homebrew user.
If you want to update the latest version of Python 3, then you are a right place. Homebrew is the simplest way to do this quickly. For that, you need for the Homebrew installation on your Mac, if you want to use the Homebrew method, but if you are interested in messing around with Python, then Homebrew will probably appeal to you anyway.
We supposed that you have already used the Homebrew. But if you don’t then no need to worry about it, you will get below a simple process to install Homebrew on Mac OS.
- To install the latest version of Python 3 using Homebrew, need to use the below-given command string:
brew install python3
- Once the updated Python 3 has been installed on your Mac, you can run it with:
Steps to Check What Version of Python is Currently Installed in Mac OS:-
- If you want to know that what version of Python is installed then you ne4ed to go to the Terminal application and simply to type the following command:-
- python –version
- If you have MacOS, then you will get it’s typically Python 2.7.x or some variation, either 2.7.4 or 2.7.10 or similar.
- When you have installed Python using Homebrew or with the package installer, then you will able to check the updated new version of Python with:
Python3 – version
- As we have discussed before, both installation process of Python is very easy. You can save your time and efforts by using these.
Please note- Some of the aspects of Python are different in each version, and even features like the instant Python simple web server tip is different from version 2 to version 3. If you want to use something long term, or learning in general, you will be better off writing in Python 3.x rather than the previous releases of Python 2.x.
With this, you have completed all of the steps, and you have got the Python 3 installed. You are ready to use it on your Mac system.