Python not running

General support questions
Post Reply
elielxsoares
Posts: 1
Joined: 2020/09/05 16:07:04

Python not running

Post by elielxsoares » 2020/09/05 16:14:16

Hi,

I have some servers with CentOS 6 installed and they were working fine. However, Python stopped working after updating some packages.
I'm not sure what happens, what I identified is that some commands like python --version work.
However, other commands that would use python are not running correctly.

An example is when using pip that uses python. Nothing just happens, the command is running and nothing happens.

I have already reinstalled, installed another version and the problems are the same.
This occurs with python2.6, 2.7, 3.4, 3.5 and 3.6.

Has anyone experienced this problem or know how I can fix the problem?

Thank you;

Att

User avatar
TrevorH
Forum Moderator
Posts: 29681
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Python not running

Post by TrevorH » 2020/09/05 16:26:24

You can't just update python on CentOS without things breaking. All the toolset for managing CentOS is written in python and they all break if you replace the system python with one of your own. Run rpm -Va python\* to get a list of the various files that might have been corrupted by your attempts to shoehorn a foreign python into the system, use rpm -qf on each of those files to see which package supplied it, download that package from one of the mirrors and use rpm to install it, correcting whatever modified files there were. You may need to download all the packages and use rpm against them all in one command to avoid dependency problems.

You also need to remove the foreign python versions from the PATH so that they are not found by mistake.

If none of that helps then you're in for a reinstall of the system and at this late stage in CentOS 6's lifetime, it probably makes more sense to move to a newer version at the same time. CentOS 6 has less than 13 weeks life left.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 6 - General Support”