Skip to content
Advertisement

Altinstall of Python 2.7.13 on RHEL7 just launches system version

I’m doing an altinstall of Python 2.7.13 on RHEL7 which has 2.7.5 installed. Here’s how I’m building from source:

JavaScript

However, even when I tried to access this altinstall directly, I’m getting the system Python, rather than the altinstall. I’ve put SELinux into permissive mode and get the same result.

JavaScript

and when I enter the interpreter

JavaScript

I’m at a loss here. From everything I’ve been reading this should work. The only thing I can think of is that since they’re both 2.7.X there’s some sort of conflict, but I thought that was the reason for altinstalls in the first place.

Advertisement

Answer

I believe you’re running into the same problem as in this thread: Strange Python compilation results with “–enable-shared” flag.

To fix it, you need to use:

JavaScript

(So that the generated binary looks for the correct shared Python library.)


As a sidenote, I think you’d be much better served by Red Hat Software Collections when you need to have different Python versions on one system. Check out About RHSCL.

Advertisement