linux下Python安装urllib3模块遇到的破事

导入报错

[root@hizhanghao python]# pip install urllib3
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Requirement already satisfied: urllib3 in /usr/lib/python2.7/site-packages (1.10.2)
pyopenssl 17.2.0 has requirement cryptography>=1.9, but you'll have cryptography 1.7.2 which is incompatible.

jinja2 2.9.5 has requirement MarkupSafe>=0.23, but you'll have markupsafe 0.11 which is incompatible.

报错1解决:

[root@hizhanghao python]# pip install --upgrade ndg-httpsclient

[root@hizhanghao python]# pip install urllib3
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Requirement already satisfied: urllib3 in /usr/lib/python2.7/site-packages (1.10.2)

jinja2 2.9.5 has requirement MarkupSafe>=0.23, but you'll have markupsafe 0.11 which is incompatible.

报错2解决

[root@hizhanghao python]# pip install Jinja2==2.6

搞定

[root@hizhanghao python]# pip install urllib3

Looking in indexes: https://pypi.mirrors.ustc.edu.cn/simple

Requirement already satisfied: urllib3 in /usr/lib/python2.7/site-packages (1.10.2)


你可能感兴趣的:(工作日常)