Python 2 will soon be obsolete. Python 3 can be a challenge to navigate. It is strongly recommended to use virtual environment to manage python projects. Don't use system python for your projects.
Here is an example to start a project named isc3313. This approach will isolate python issues to the specific environment without impacting anything else.
scl enable rh-python36 bash virtualenv isc3313 source isc3313/bin/activateManage anything needed for this project
pip install tensorflow...To exit the environment, run
deactivate
To determine if you are running a particular Software Collection:
echo $X_SCLS
To test a Software Collection state, use "scl_enabled rh-python36" exit code.
To run script using python3.6 through Redhat Software Collection, use the following script template
#!/usr/bin/scl enable rh-python36 -- python3 import sys version = "Python %d.%d" % (sys.version_info.major, sys.version_info.minor) print("You are running Python",version)
For more details, refers to Python 3 on RHEL