python3安装pip3(install pip3 for python 3.x)


当前第2页 返回上一页

哈哈。。通过以上我们已经给python3安装好了 pip3了。。。(小伙伴们也可以做个软连接,来方便实用奥。。)

三、来做个测试吧

1.首先我们进入pytho3

1

2

3

4

5

6

7

8

9

[root@centos3 bin]# python3

Python 3.5.2 (default, Jul 27 2016, 03:36:56)

[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux

Type "help", "copyright", "credits" or "license" for more information.

>>> import pymysql

Traceback (most recent call last):

 File "<stdin>", line 1, in <module>

ImportError: No module named 'pymysql' ##没有此模块奥

>>>

好 ,我们用新安装的pip3来装下试试:

1

2

3

4

5

6

7

8

[root@centos3 bin]# /opt/Python/bin/pip3 install pymysql

Collecting pymysql

 Downloading PyMySQL-0.7.5-py2.py3-none-any.whl (77kB)

 100% |████████████████████████████████| 81kB 3.2kB/s

Installing collected packages: pymysql

Successfully installed pymysql-0.7.5

 

######安装完成

安装完成了,看来pip3本身没有问题,我们测试下是否真正的给python3装上了这个模块吧(有可能装到了python2上了呢 ……-_-#)

1

2

3

4

5

6

[root@centos3 bin]# python3

Python 3.5.2 (default, Jul 27 2016, 03:36:56)

[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux

Type "help", "copyright", "credits" or "license" for more information.

>>> import pymysql

>>>

哈哈哈 ok了。。 结束!!

以上就是python3安装pip3(install pip3 for python 3.x)的详细内容,更多文章请关注木庄网络博客!!

返回前面的内容

相关阅读 >>

ubuntu环境下,图例中文乱码怎么办?

Python可以代替vb吗

int在Python中是什么意思

爬虫和Python什么关系

Python运算符-最常用的算数运算符(实践总结)

Python可以用来干什么?

Python中str是什么意思

Python如何安装库

Python中subprocess库的用法介绍

自学Python能干什么

更多相关阅读请进入《Python》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...