I am running CentOS 6.5, which has python 2.6. I need python 2.7 so I installed that and it works and is my default python. But yum does not work with that, so I changed the shebang line for yum to /usr/bin/python2.6 and then yum works again. But when I install a python package with yum it get installed to /usr/lib64/python2.6/site-packages/. How can I get yum to install to /usr/lib64/python2.7/site-packages? Thanks!
On 04/27/2014 03:58 PM, Larry Martell wrote:> I am running CentOS 6.5, which has python 2.6. I need python 2.7 so I > installed that and it works and is my default python. But yum does not > work with that, so I changed the shebang line for yum to > /usr/bin/python2.6 and then yum works again. But when I install a > python package with yum it get installed to > /usr/lib64/python2.6/site-packages/. How can I get yum to install to > /usr/lib64/python2.7/site-packages?You don't. That's determined by the package build, not anything to do with the package installer tools (either rpm or yum). Some 3rd party repositories like IUS or software collections have python27, and that's the best way to install it. If you've built your python from source, then you've circumvented the package manager and done "Bad Things". -- Jim Perrin The CentOS Project | http://www.centos.org twitter: @BitIntegrity | GPG Key: FA09AD77
On Sun, Apr 27, 2014 at 1:58 PM, Larry Martell <larry.martell at gmail.com> wrote:> I am running CentOS 6.5, which has python 2.6. I need python 2.7 so I > installed that and it works and is my default python. But yum does not > work with that, so I changed the shebang line for yum to > /usr/bin/python2.6 and then yum works again. But when I install aThis is a bad hack. Undo the damage. Then install the official CentOS Software Collections repo. https://www.softwarecollections.org/en/ It has Python27. I just asked the list how to install Python3 on CentOS. After having looked at the other options, SCL was IMHO, the easiest and best solution. Red Hat/CentOS has really hit a home run with SCL.