浏览模式: 普通 | 列表
4月, 2017 | 1

CentOS6.5上安装Python2.7和PIP

[ 2017-04-18 15:41:22 | 作者: admin ]
p.s. 安装完新的python之后,需要安装兼容的pip新版本,安装完python2.7.13可以安装pip9.0.1

目前大部分用户使用的CentOS6.5上默认的Python还是2.6版本。升级到Python2.7碰到很多问题。本文将介绍如何安装Python2.7。

1. 安装必要的准备包

               安装过程将用到gcc,方便起见,安装“Development Tools”
yum groupinstall "Development tools"

                 另外,Python安装中需要的一些依赖包
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel
...

阅读全文…

centos下使用yum 安装pip

[ 2017-04-18 10:01:43 | 作者: admin ]
centos下安装pip时失败:

[root@wfm ~]# yum -y install pip
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.tuna.tsinghua.edu.cn
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.tuna.tsinghua.edu.cn
Setting up Install Process
No package pip available.
Error: Nothing to do



解决方法:
 

需要先安装扩展源EPEL。
...

阅读全文…
1