By default, CentOS 7 comes with Python 2.7.5, and Python 2.7.5 is a crucially built-in part of the CentOS basesystem. However, we intend to create our project with Python version 3.7, so we will now install Python 3.7 on CentOS 7.
At the time of writing this book, Python 3.7Â is the current version, and its installation requires the GCC compiler on our ec2 instance. Please refer to the following steps to install the prerequisites for Python before installing it:
- First, we enable SCL by installing the CentOS SCL release file. This is included in the CentOS Extras repository:
[root@ip-172-31-95-213 src]# yum install gcc openssl-devel bzip2-devel libffi-devel
- After executing the preceding command, the console will look similar to Figure 4.1. Please answer y and you should see something similar to the following screenshot:
Figure 4.1 – Installing the CentOS SCL release file
- Next, download Python 3.7 using the following command from Python...