centos6.7 安装python2.7、pip2.7、easy_install-2.7的方法
centos6自带python2.6版本,根据需要,安装python2.7、easy_install-2.7、pip2.7
依赖
yum groupinstall -y Development tools yum install -y zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
安装Python2.7
wget https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tgz tar xvf Python-2.7.11.tgz cd Python-2.7.11 ./configure --prefix=/usr/local make && make install && echo OK
安装完后的Python的可执行文件目录是 /usr/local/bin
安装完后的python安装目录路径是 /usr/local/lib/python2.7
此时可通过python2.7命令验证安装
安装 setuptools(easy_install-2.7) + pip2.7
注意:一定要使用 python2.7 来执行相关命令
# 下载setuptools,easy_install 的安装包 wget https://bootstrap.pypa.io/ez_setup.py #安装easy_install-2.7 python2.7 ez_setup.py #安装完成后/usr/local/bin/目录下出现easy_install-2.7 #安装pip2.7 easy_install-2.7 pip #安装完成后/usr/local/bin/目录下出现pip2.7 #升级pip2.7版本 pip2.7 install --upgrade pip
至此easy_install-2.7、pip2.7安装完成
pip2.7 install [packagename] pip2.7 install --upgrade [packagename] pip2.7 uninstall [packagename]
相关推荐
张立军的架构之路 2020-09-28
chaochao 2020-08-31
liai 2020-08-09
xiaogoua 2020-08-06
hline 2020-07-29
zhangsyi 2020-07-28
lizhengfa 2020-07-27
yqoxygen 2020-07-20
yongzhang 2020-07-19
IsanaYashiro 2020-07-08
梧匠 2020-07-04
ajuan 2020-06-21
书弋江山 2020-06-12
AndesStay 2020-06-12
zhangpan 2020-06-11
greent00 2020-06-10
Nicolase 2020-06-10
csdmeb 2020-06-08