Is there a way to install Python 3.x on CentOS 7.x without breaking anything that depends on an older version of Python? This server is a minimal CentOS 7 install that primarily runs a simple LAMP setup.
Yes. Just don’t delete 2.x version
(Sent from iPhone, so please accept my apologies in advance for any spelling or grammatical errors.)
# yum install python34
yum install CentOS-release-scl yum search rh-python35
Install what you need, then you have a couple choices about how to use the SCL for Python 3.5. For your choices, see
I should have mentioned that python34 comes from the epel repo.
which can be installed from:
I already have epel installed. If it breaks something is it as simple as yum erase python34 to restore everything back to normal?
If it’s in epel it will have been tested with RHEL/CentOS so shouldn’t break anything. But yes, a yum erase should remove it.
Consider using “yum history undo” or “yum history revert” to remove dependencies as well.
be pretty hard to break anything, it installs…
and puts all the runtime libs in /usr/lib64/python3.4
the default C7 python is…
with libraries in /usr/lib64/python2.7
so no overlap at all. if you want python 3.4, you have to invoke it explicitly.
I much prefer the Anaconda distribution of Python3. It installs for a single user and is completely self contained. Also much more recent versions are available: