开发者

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 b开发者_如何学编程uild 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.


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.


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.


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


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


You can install python26-devel by:

sudo yum install python26-devel.x86_64
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜