CentOSThis forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
/usr/bin/yum is most definitely a Python script, but it's for Python 2. If you installed Python 3 in place of Python 2, or made Python 3 the default, that's going to break many things on your system. You can install Python 3.x alongside Python 2, but Python 2 needs to remain the default. There is a Python 3.4 package (python34-3.4.5-4.el7) available for CentOS 7 from the epel repo. I don't know of any Python 3.5 package that has been built for CentOS.
I have both versions of python installed. The default CentOS 7.3 is Python 2.7, while I also installed Python 3.5.2.
When the root account is configured to use Python 3.5.2 I get the 'yum' error as shown above. When I switch back to using Python 2.7 then 'yum' works.
It's a basic "Doc, it hurts when I do this," : "Don't do that" issue. If you set up an environment to use Python 3.x, then any system Python scripts you launch from that environment are going to fail.
How can one identify the necessary fixed to get CentOS 7.3 to work properly with the installed Python version?
Version 2.7 is horribly out of date, and even 3.5.2 is still out of date and needs to get pushed further forward.
This seems to be a flaw in the design of CentOS in that it's using critically out of date software and doesn't appear to be making any effort to bring things up to proper levels.
Many places I have researched on the web are saying to get off 2.7 as soon as possible, but it seems the OS it tied to this out of date version.
This needs to get addressed as soon as possible.
Why do you think that? python 2.x and 3.x are not compatible with each other, and 2.x is not outdated at all. see for example here: https://www.python.org/downloads/
CentOS is not tied to python 2, but huge amount of apps are implemented using python 2 and actually (almost) impossible to reimplement all of them with python 3 quickly. This is valid for all linux distros including debian, ubuntu, centos and (almost) all of them.
This seems to be a flaw in the design of CentOS in that it's using critically out of date software and doesn't appear to be making any effort to bring things up to proper levels.
CentOS is basically a free version of Red Hat. People who run their businesses with RHEL don't want the latest stuff, they want the tried and tested stuff. The same goes for most CentOS users (who run half the internet). If you try to make CentOS "up-to-date" you will have problems. If you feel that you really need to do it, then it's probably a sign that you shouldn't be using CentOS in the first place!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.