python3 与 pip3 安装与使用

1. yum -y install openssl*  

(pip依赖ssl环境)

 

2.编译安装python3

下载地址:https://www.python.org/ftp/python/

tar zxvf Python-3.5.2.tgz
cd Python-3.5.2
./configure
make && make install 

 

 

3.安装完成后默认就有pip3了.
 
4.安装完成可以装个模块试试
复制代码
1 [root@localhost Python-3.5.2]# pip3 install pymysql
2 Collecting pymysql
3   Downloading PyMySQL-0.7.9-py3-none-any.whl (78kB)
4     100% |████████████████████████████████| 81kB 6.3kB/s 
5 Installing collected packages: pymysql
6 Successfully installed pymysql-0.7.9
7 You are using pip version 8.1.1, however version 9.0.1 is available.
8 You should consider upgrading via the 'pip install --upgrade pip' command.
复制代码

 上面提示有新版本了  可以升级.

使用它提示的命令就可以升级pip3了..

但是注意要把pip命令替换成pip3

复制代码
 1 [root@localhost Python-3.5.2]# pip3 install --upgrade pip
 2 Collecting pip
 3   Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
 4     100% |████████████████████████████████| 1.3MB 3.2kB/s 
 5 Installing collected packages: pip
 6   Found existing installation: pip 8.1.1
 7     Uninstalling pip-8.1.1:
 8       Successfully uninstalled pip-8.1.1
 9 Successfully installed pip-9.0.1
10 [root@localhost Python-3.5.2]# pip3 --version
11 pip 9.0.1 from /usr/local/lib/python3.5/site-packages (python 3.5)
复制代码

升级完成

posted @ 2017-02-23 22:50  玻璃外的风景  阅读(1214)  评论(0编辑  收藏  举报