centos安装python2.7和pip2.7

前端之家收集整理的这篇文章主要介绍了centos安装python2.7和pip2.7前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

安装python2.7

yum groupinstall -y "Development tools"

yum -y install gcc gcc-c++ make zlib-devel pcre-devel openssl-devel install perl perl-devel perl-ExtUtils-Embed libcurl-devel lrzsz  lzo lzop  libcurl-devel pycurl  zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel python-devel

wget http://python.org/ftp/python/2.7.10/Python-2.7.10.tar.xz

tar xf Python-2.7.10.tar.xz 
cd Python-2.7.10 

./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"

make && make altinstall

wget https://bootstrap.pypa.io/get-pip.py
python2.7 get-pip.py

参考:http://superuser.com/questions/762185/python2-7-pip2-7-install-in-centos6-root-does-not-see-usr-local-bin

原文链接:https://www.f2er.com/centos/381813.html

猜你在找的CentOS相关文章