python 安装request模块

python 安装request模块


pip 安装时出现报错信息:
Could not fetch URL https://pypi.python.org/simple/requests/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) - skipping

Could not find a version that satisfies the requirement requests (from versions: )
No matching distribution found for requests

解决方法:
使用豆瓣的镜像源

pip install -i --trusted-host http://pypi.douban.com/simple/  requests

pip 安装时出现报错信息:
Cannot unpack file /private/tmp/pip-uifyBq-unpack/simple (downloaded from /private/tmp/pip-6ZThZw-build, content-type: text/html; charset=utf-8); cannot detect archive format
Cannot determine archive format of /private/tmp/pip-6ZThZw-build
解决方法:
使用管理员权限 sudo

sudo pip install -i https://pypi.douban.com/simple/ requests

你可能感兴趣的:(python 安装request模块)