1

There are two versions of Python that can be installed on RHEL 6.7, as many obviously know. Yum needs 2.6, and other programs for example Graphite need 2.7

After digging into it, I see that even when I have a shell spawned or started with scl enable python27 bash

I am having to issue commands like :

LD_LIBRARY_PATH=/opt/rh/python27/root/usr/lib64 /opt/rh/python27/root/usr/bin/uwsgi

I.E. start the correct version of uwsgi with the correct version on python.

Is there a way that I can alias these, create a special shell or something so that I don’t cause conflicts between the two version when yum is issued? How can they be activated in a virtualenv for example, and have yum disabled, wouldn't that make installing things difficult?

I know how to set them as defaults, but it’s annoying to have to unset and reset every time you need to install a package or restart the system or a service.

Bob R
  • 111
  • 1

1 Answers1

0

not sure this is what you need, but one way to have several versions of software installed is environment modules (http://modules.sourceforge.net) although this is most often used by users to control their software and less often by admins

if you need something specific to python, then (python) virtualenv will also work, but the environment modules are a bit more versatile

liskawc
  • 41
  • 8