VacuumTube
VacuumTube

Reputation: 4121

Install packages to Python2.6

I've just installed Python2.6 on CentOS 5. I have to type python26 to run it. If I type python I get the default Python 2.4.

Now I need to build a package using python2.6, but it fails because it can't find python-devel. I know python-devel is installed for Python 2.4. How do I install python-devel (or other packages) specifically for Python 2.6?

EDIT

I know on WebFaction they have easy_install2.6 to do this type of thing.

Upvotes: 1

Views: 3108

Answers (5)

Yoichi
Yoichi

Reputation: 12261

You can install python26-devel by:

sudo yum install python26-devel.x86_64

Upvotes: 0

Rahul Arora
Rahul Arora

Reputation: 1036

You can change ~/.bash_profile and add your local python26 install at the start of the PATH.

If you want proper instructions, write the output of which python and tell me the location of your python26 install.

My .bash_profile looks like:

PATH="/usr/local/bin/python":/bin:/sbin:/usr/bin:/usr/sbin:$PATH:$HOME/bin
export PATH
unset USERNAME

Upvotes: 0

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798686

python-devel won't help you, since it will only be available for 2.4. You will need to install the package from source with the appropriate version of Python, e.g. python2.6 setup.py install.

Upvotes: 2

Nikita Hismatov
Nikita Hismatov

Reputation: 1656

You can use virtualenv and virtualenvwrapper - these are tools that help you to install and maintain different versions of python on the save machine. Works fine.

http://pypi.python.org/pypi/virtualenv http://www.doughellmann.com/projects/virtualenvwrapper/

sory, i can't post links yet

Upvotes: 0

sinelaw
sinelaw

Reputation: 16553

You can install a specific version of the package, such as:

yum install python-devel-2.6.2-5.el6.i686

I don't know the exact package version, depends on your CentOS version.

Upvotes: 0

Related Questions