在Centos 5.{5,6} 安装Python 2.7
2013-01-03 20:10
411 查看
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | # chmod +x install-python.sh # ./install-python.sh #!/bin/bash # Install necessary packages yum -y install gcc gdbm-devel readline-devel ncurses-devel zlib-devel bzip2-develsqlite-devel db4-devel openssl-devel tk-devel bluez-libs-devel make cd /var/tmp wget http://sqlite.org/sqlite-amalgamation-3.7.3.tar.gz tar xfz sqlite-amalgamation-3.7.3.tar.gz cd sqlite-3.7.3/ ./configure make make install cd /var/tmp wget http://www.python.org/ftp/python/2.7.1/Python-2.7.1.tgz tar xvfz Python-2.7.1.tgz cd Python-2.7.1 ./configure --prefix=/opt/python2.7.1 --with-threads --enable-shared make make install touch /etc/ld.so.conf.d/opt-python2.7.1.conf echo "/opt/python2.7.1/lib/" >> /etc/ld.so.conf.d/opt-python2.7.1.conf ldconfig ln -sf /opt/python2.7.1/bin/python /usr/bin/python2.7 cd /var/tmp wget http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg sh setuptools-0.6c11-py2.7.egg --prefix=/opt/python2.7.1 /opt/python2.7.1/bin/easy_install pip ln -sf /opt/python2.7.1/bin/pip /usr/bin/pip pip install virtualenv ln -sf /opt/python2.7.1/bin/virtualenv /usr/bin/virtualenv echo "alias python=/opt/python2.7.1/bin/python" >> ~/.bash_profile echo "alias python2.7=/opt/python2.7.1/bin/python" >> ~/.bash_profile echo "PATH=$PATH:/opt/python2.7/bin" >> ~/.bash_profile source ~/.bash_profile # Done |
相关文章推荐
- 【Linux】 CentOS6.5安装Python2.7以及pip等工具
- centos5.6 安装 python 2.7
- Centos6.8 python2.6升级至2.7,并安装setuptools和pip
- CentOS6.5安装Python 2.7
- 阿里云Centos7 安装 Anaconda python2.7
- linux/centos6.5下编译安装python2.7和python3.5.2
- centos 已经安装python2.7 升级到python3.5
- centos上安装python2.7
- 在CentOS下安装Python2.7
- centos python2.7安装setuptools\pip
- CentOS升级Python2.6到Python2.7并安装pip
- Centos6.8 python2.6升级至2.7,并安装setuptools和pip
- centos 安装 python2.7及开发环境
- centos虚拟机安装升级版的python2.7问题
- linux/centos6.5下编译安装python2.7和python3.5.2
- CentOS升级Python2.6到Python2.7并安装pip
- centos7.2+python2.7 opencv安装教程(校园网无法连接校外网情况)
- centos 安装python2.7
- centos安装更新Python2.7以及pip的安装
- centos6.5安装python2.7