Please keep in mind that Yum will not know that you’ve installed a software if you manually compiled the source code. An advantage to this is that you’ve got more control over it. This method of installing Python is the more difficult approach, and it will take a bit longer. Method #2 – Compiling Python 3 from Source Code If you exit the session, and open a new one in the terminal, then the default version will be v2.7.5. If you check what Python version you have, you should see the following:ĭo keep in mind that Python 3.6 is the default Python version only in this shell session. Now you should have Python 3.6 installed. To install it on our CentOS 7 machine, run the following command: $ sudo yum install rh-python36 In this tutorial, we’ll install the latest one, which is Python 3.6. Currently, the available versions of Python 3 are: ![]() You can easily search their website to see their pre-compiled Python versions. Now that we have access to the SCL repository, we can install any version of Python they have available. To do this run: $ sudo yum install centos-release-scl Step 2 - Install Python 3.6 from the Repository To enable SCL we’ll have to install the CentOS SCL release file. By installing different versions of Python alongside the default v2.7.5, we won’t affect system tools such as `yum`, so they’ll continue to work properly. By using SCL we have access to newer versions of packages that aren’t available in the core repositories.ĬentOS 7 comes with Python 2.7.5 built-in, which is critical to CentOS. SCL is a community project that allows us to install multiple versions of software on the same system, without affecting default packages. This is the easier method to install Python on your machine.įor this, we’ll use Software Collections (SCL). ![]() ![]() Get started now Method #1 – Installing Python 3.6 on Centos 7 from a Repository
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |