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.
9 thoughts on - Python 3.x On CentOS 7
Yes. Just don’t delete 2.x version
(Sent from iPhone, so please accept my apologies in advance for any spelling or grammatical errors.)
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:
9 thoughts on - Python 3.x On CentOS 7
Yes. Just don’t delete 2.x version
(Sent from iPhone, so please accept my apologies in advance for any spelling or grammatical errors.)
Yes.
# 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
https://www.madboa.com/blog/2016/08/29/scl-intro/
I should have mentioned that python34 comes from the epel repo.
which can be installed from:
https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F
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.
P.
Consider using “yum history undo” or “yum history revert” to remove dependencies as well.
be pretty hard to break anything, it installs…
/usr/bin/python3
/usr/bin/python3.4
and puts all the runtime libs in /usr/lib64/python3.4
the default C7 python is…
/usr/bin/python
/usr/bin/python2
/usr/bin/python2.7
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:
https://www.continuum.io/downloads