Install Python 2.6 on CentOS 5
2012-02-24 00:40
393 查看
Install Python 2.6 on CentOS 5
1. Download python source from python.org and Uncompress it.
Install Python 2.6 on CentOS 5
CentOS 5 is the most common Python hosting environment in the market, but the default version of python it is 2.4 now. As some projects request the python version to be greater than V2.5, in this article, you will see how to install python 2.6 by compiling source code step by step.1. Download python source from python.org and Uncompress it.
$ wget http://www.python.org/ftp/python/2.6.7/Python-2.6.7.tgz $ tar xzvf Python-2.6.7.tgz2. Build & Install. In the source code folder:
$ ./configure --prefix=/opt/python2.6 --with-threads --enable-shared --with-zlib=/usr/include $ make $ make install3. Add Python 2.6 lib to system lib. execute:
$ sudo ln -s /opt/python2.6/lib/libpython2.6.so /usr/lib $ sudo ln -s /opt/python2.6/lib/libpython2.6.so.1.0 /usr/lib # Create necessary links and cache $ sudo /sbin/ldconfig -v # make a symbolic link to python $ sudo ln -s /opt/python2.6/bin/python /usr/local/python4. Check python version use "python -V". If you still see old version of Python, you need to edit /etc/profile (as root), add the following line:
pathmunge /opt/python2.6/bin/Above setting should be added before the line like:
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRCThen re-login system, try "python -V" again. 5. After install yum, try "yum search php"This is to make sure we did not accidentally mess up "yum", which is the biggest threat when upgrading Python version. If you see no errors, you should be good to start using Python 2.6.
相关文章推荐
- How to install python, wxPython and ride on CENTOS
- Python 2.7 install on centos 6.5
- 【CentOS】CentOS6.x 下python2.6升级到python2.7,easy_install的安装
- Install python 2.6 in CentOS - Stack Overflow
- Install MySQL 5 for Python 2.6 (and django) on Windows
- centos自带python2.6升级到python2.7。并解决yum pip easy_install pip等模块兼容性问题
- How to install Python 2.7.3 on CentOS 6.2
- How to Install Python 2.7 on CentOS6.5
- How To Install Python 2.7 with mod_wsgi on CentOS 5.6 with cPanel
- install liblinear on python (centos7)
- How to install Python 2.7 and Python 3.3 on CentOS 6
- centos install python2.6
- python easy_install install on centos
- How to install Python 2.7.3 on CentOS 6.2
- Install Python 3 on CentOS 6.5 Server
- How to install Python 2.7 and Python 3.3 on CentOS 6
- How to install Python 2.7.3 on CentOS 6.2
- install Python 2.7 and Python 3.3 on CentOS 6
- How to install Python 2.7 and Python 3.3 on CentOS 6
- Install Python 3 on CentOS 6.5