CUEH

Development Environment Guides

Installing Python

Installing Python

As part of the programming module you study on the course, you will be tasked with using the Python programming language to complete lab activities.

In this guide, you shall be taken through the journey of installing Python for the macOS operating system.

Downloading the Python Installer

Before you can begin using Python for programming and providing solutions to lab activities and assignments, you will need to download the Python installer from the following link:

Python3 Windows Installer

On the website, you will need to download the option labelled as macOS 64-bit universal2 installer as highlighted in Figure 1.

Figure 1

Figure 1. Downloading and Installing the Python3 macOS Package.

Installing Python

Once the Python executable file has been downloaded, you can proceed with installing the package on your Windows machine. When you open the installer, you will be met with a window similar to the one shown in Figure 2.

Figure 2

Figure 2. The Python3 Installer.

Follow the on-screen instructions to install the Python interpreter on your machine. When you get to the step labelled Installation Type and click on the Install button, a pop-up will be presented asking for your user accounts password. Enter your password, and carry on with the installation process.

Once the Python interpreter has been successfully installed, a Finder window will pop-up, showing the contents of the Python folder on your machine, as shown in Figure 3.

Figure 3

Figure 2. The Python3 Directory on your macOS Machine.

Inside this folder, you will see a file called Update Shell Profile.command, you will need to run this file. It will update the Path environment to point towards the Python interpreter. This will enable you to use the command python3 in the command-line interface (CLI). Double click on the file, and the Path environment will be updated.

Checking the Python Installation

To confirm that everything is working as expected, you will need to perform a quick check using the command-line interface. To perform this check, open Terminal by searching for Terminal in the Launchpad screen as shown in Figure 4.

Figure 4

Figure 4. Searching for Terminal in the Launchpad Screen.

With the command-line interface open, you can type the command python3 and the Python interpreter should be loaded and look similar to the window shown in Figure 5.

Figure 5

Figure 5. The Python Interpreter in Terminal.

Conclusion

That is the end of this guide on installing Python If you have followed all the necessary steps correctly, you should have a fully functional implementation of Python which will enable you to complete any necessary programming-based activities you will participate with on this course.

Mistakes or Problems?

If you have spotted any errors or issues within this tutorial, you can e-mail Dr Ian Cornelius. Ensure to include in your message a description of the error/issue and a possible resolution. Also do not forget to include a URL to the page with the issue/error.