ERROR: Could not find a version that satisfies the requirement requests (from v ersions: none)

今天在安装requests库时报以下错误

ERROR: Could not find a version that satisfies the requirement requests (from v ersions: none)_第1张图片

 提示说是没找到合适的requests库,建议更新pip版本,于是执行命令

# python -m pip install --upgrade pip

提示:No module named pip

提示说没找到pip模块,搜了下百度,说要执行一下命令确保pip 

#  python -m ensurepip

ERROR: Could not find a version that satisfies the requirement requests (from v ersions: none)_第2张图片

然后再执行一下:# python -m pip install --upgrade pip

又提示:Could not install packages due to an EnvironmentError: [WinError 5] 拒绝
访问。

说是权限拒绝,建议加--user,所以得加上--user再执行一下,命令如下:

#  python -m pip install --user --upgrade pip

(如果又提示:No module named pip,请再执行一下#  python -m ensurepip再执行以上更新pip命令)

最后更新成功了,可执行一下命令查看pip版本信息

# pip list

# pip -V

至此解决!!

相关文献:

 https://www.cnblogs.com/badaoliumangqizhi/p/11845158.html

https://blog.csdn.net/wang1114wang/article/details/81628901

你可能感兴趣的:(python,python)