How to Install Python on Mac

How to Install Python on Mac

If you intend to use our Python courses with a code editor like Visual Studio, Anaconda, Spyder, or something else, you will need to first install the Python runtime to your local computer. This short article will cover how to do this for macOS - for Windows see this article instead: How to Install Python on Windows

 

Download Python

1. Head to the Python website's download page: https://www.python.org/downloads/

2. Download a compatible version. Note that this may vary by course depending on the Python libraries used in the course. We recommend reviewing the course's information to determine the appropriate version.


Install on Mac

This section will cover installation as it applies to Mac. Windows users should follow the steps outlined in the previous section.

1. Open the package file downloaded to your computer and follow the on-screen instructions.









2. Once the installation finishes, you will get a congratulations message and can close the installation wizard.


Verifying Installation

Once the installation finishes, we'll want to verify that Python is properly installed. To do so, follow the steps below:

1. Start the Python IDLE application - Python's built-in shell for running Python files.




2. Go to File > New File from the top menu to create a new file:

 

3. In the new file, enter the following code into the editor: 
  1. print("Hello world")


4. Save the Python file
5. Select Run > Run Module from the top menu, or hit F5.




5. If Python is installed correctly, a new window should pop-up with our "Hello world" message printed!


    • Related Articles

    • How to Install Python on Windows

      If you intend to use our Python courses with a code editor like Python's build-in IDLE, Visual Studio, Anaconda, Spyder, or something else, you will need to first install the Python runtime to your local computer. This short article will cover how to ...
    • How to Install Visual Studio Code for Mac

      In this article, we'll showcase how to install Visual Studio Code (VSC), a multi-language applicable code editor, for macOS. If you'd like to install VSC for Windows, see this article instead: How to Install Visual Studio Code for Windows Installing ...
    • How to Install Android Studio on Mac

      This article will cover how to install Android Studio for macOS. For installation on Windows, we recommend checking out this article instead: How to Install Android Studio on Windows Download Android Studio 1. Head to the Android developers website ...
    • How to Install SFML for Mac

      In this article, we'll cover how to install the Simple and Fast Multimedia Library (SFML) for C++ projects for Mac. If you'd like to SFML for Windows, please see this article instead: How to Install SFML for Windows Installing SFML 1. Navigate to the ...
    • How to Install Visual Studio Code for Windows

      In this article, we'll showcase how to install Visual Studio Code (VSC), a multi-language applicable code editor, for Windows. If you'd like to install VSC for Mac, see this article instead: How to Install Visual Studio Code for Mac Installing VSC ...