The cookie is used to store the user consent for the cookies in the category "Performance". This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". The cookie is used to store the user consent for the cookies in the category "Other. The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". The cookie is used to store the user consent for the cookies in the category "Analytics". These cookies ensure basic functionalities and security features of the website, anonymously.
To remove alternatives alternatives -remove-all pythonĪnd that is how easy it is to install Python on Rocky Linux 8.Necessary cookies are absolutely essential for the website to function properly. You can list the alternatives update-alternatives -list libnssckbi.so.x86_64 auto /usr/lib64/pkcs11/p11-kit-trust.soĬifs-idmap-plugin auto /usr/lib64/cifs-utils/cifs_idmap_sss.so alternatives -install įor example update-alternatives -install /usr/bin/python python /usr/bin/python3.9 1 You can also use the command below to set default Python version. In the above, option 2 was selected, which sets Python 3.6.8 as the default version python -V Python 3.6.8 The + symbol shows the current default version. Select enter specific number that defines the version of Python you want to set as the default version and press ENTER key. Sample output There are 5 programs which provide 'python'.Įnter to keep the current selection, or type selection number: 2 If you have multiple versions of Python installed, you can use alternatives command to set your default version of Python.įor example, you can run the command below to set your default version of Python. 1 root root 32 Jul 2 19:01 /usr/bin/python3.6m -> /usr/libexec/platform-python3.6m 1 root root 31 Jul 2 19:01 /usr/bin/python3.6 -> /usr/libexec/platform-python3.6 1 root root 25 Jul 16 11:53 /usr/bin/python3 -> /etc/alternatives/python3
To list all available versions of Python, run the command below ls -alh1 /usr/bin/python* lrwxrwxrwx.
Python2-setuptools noarch 39.0.1-13.module+el8.4.0+403+9ae17a31 appstream 641 kĬhecking Python 2.x version python2 -V Python 2.7.18 List All Available Python Versions dnf install python2 Dependencies resolved. Note that Python 2 is no longer supported. To install Python 2.7 simply execute the command below. Python3-setuptools noarch 39.2.0-6.el8 baseos 162 k To install Python 3.6 simply execute the command below dnf install python36 Dependencies resolved. To install Python 3.8 simply execute the command below dnf install python38 Dependencies resolved. Sample output Python 3.9.2 Install Python 3.8 on Rocky Linux 8 Once installed, you can always counter check the installed version of Python, if you dont already have other versions installed python3 -V Package Architecture Version Repository Size To install Python 3.9 on Rocky Linux 8, run the command below dnf install python39 Dependencies resolved. As of this writing, the default Rocky Linux 8 AppStream repository provides Python 2, Python 3.6, 3.8, and 3.9.