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 Linux (Debian-based) operating system.
Downloading and Installing Python
By default, Linux comes pre-installed with Python 3. However, there are some additional libraries you will want to
aid in the development of your scripts and applications. To install these additional libraries you will need to use
the command-line interface. To open the Terminal window, you will need to search for Terminal
in the
Application screen as shown in Figure 1.
With the command-line window open, you can install the necessary libraries by using the following command:
$ sudo apt install python3-dev
When this command is entered in the command-line interface window, you will be met with a screen similar to the one shown in Figure 2.
In the screenshot, you will see a question is asked whether you wish to proceed with the installation. Enter Y
into
the command-line interface window and push Enter on the keyboard. This will begin the process of downloading the
necessary additional libraries for Python. Once this process has finalised, you will be met with a screen similar to the
one shown in Figure 3.
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 Application screen as shown in
Figure 1.
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 2.
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.