rhel7-upgrade-python-2.x-to-3.x

Upgrade Python to 3.x on RHEL 7

1. Enable rhscl and optional software repositories

#subscription-manager repos --enable rhel-7-server-optional-rpms --enable rhel-server-rhscl-7-rpms


2. Install development packages to make sure GCC, make and git get install-python3-rhel/

#yum install @development -y


3. Install python and its tools

#yum install rh-python* -y


4. Enable latest python version for your scripts make sure you have rh-python36

#scl enable rh-python36 bash


5. Permanently add new version

$ cat /etc/profile.d/enablepython36.sh
#!/bin/bash
source scl_source enable python36



Comments

Post a Comment