I am currently running RHEL 6.6. This has python 2.6.6
pre-installed and is the default. I installed python 2.7
using the altinstall
method. The default python is still 2.6.6
. I'm trying to install the python-devel
packages using yum
which only runs with root. However when I run yum install python-devel
as root it installs the packages to python 2.6.6
.
Is there a way to get yum to install packages using the alt python install?
You may want to use the Python 2.7 version that is available as part of "Software Collections". This is installed along side the original 2.6 and doesn't try to replace it (and is included in nearly all RHEL subscriptions.) See info here:
Introduction: http://developers.redhat.com/products/softwarecollections/overview/
List of available components including Python 2.7: https://access.redhat.com/documentation/en-US/Red_Hat_Software_Collections/2/html/2.0_Release_Notes/chap-RHSCL.html#sect-RHSCL-Features
It's still a yum install, but with an extra command or two. You can start with this Get Started guide for Python 3.4 ( http://developers.redhat.com/products/softwarecollections/get-started-rhel6-python/ ) but swap out the Python versions in steps 2 and 3.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.