python - 无法在 pycharm 中安装软件包并且还使用命令提示符错误“找不到版本”
问题描述
我无法使用 Pycharm Professional 2019(Windows 10、64 位)安装任何软件包。
它总是生成相同的错误 «非零退出代码 (1) 找不到满足要求请求的版本(来自版本:)没有为请求找到匹配的分布 。它还告诉检查为 Python 安装的pip版本。我的pip版本是 Python-3.7.4 的“pip 19.0.3”
下面的屏幕截图显示了 Pycharm [Error in pycharm][1] 中发生的错误。使用[命令提示符导致几乎相同的错误][2]
我还尝试将存储库更改为https://pypi.python.org/pypi但它也没有帮助。
我试试这个。但仍然出现错误
C:\>pip --proxy=http://pypi.python.org/simple/ --trusted-host pypi.python.org install requests
Collecting requests
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000022BB22A0D88>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed'))': /simple/requests/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000022BB22C1988>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed'))': /simple/requests/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000022BB22C1888>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed'))': /simple/requests/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000022BB22CBA08>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed'))': /simple/requests/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000022BB22C1DC8>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed'))': /simple/requests/
Could not find a version that satisfies the requirement requests (from versions: )
No matching distribution found for requests
这也是
C:\>pip install requests
Collecting requests
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000025AD172C248>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/requests/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000025AD1728D08>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/requests/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000025AD1728C08>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/requests/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000025AD1728CC8>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/requests/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000025AD17106C8>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/requests/
Could not find a version that satisfies the requirement requests (from versions: )
No matching distribution found for requests
``````````````````````````
[1]: https://i.stack.imgur.com/TcgjN.png
[2]: https://i.stack.imgur.com/haNxX.png
解决方案
此问题可能是由于您端的代理或防火墙设置造成的。请检查您的代理设置
推荐阅读
- c# - WPF - 在异步任务的回调中更改 UI 文化
- ios - (Swift)即使没有文本,如何在 searchBar 上显示取消按钮?
- kubernetes - 重置 kubeadm 后无法删除 etcd
- django - 如何优化 Django admin 中针对来自另一个模型的自定义字段的查询计数?
- c# - 我可以在 Windows 便携式设备 (WPD) api 中使用部分外壳对象解析名称来获取文件流吗?
- ember.js - Ember 数据 - 对 hasMany 关系使用除 id 之外的属性
- kubernetes - 资源压力清除后恢复节点
- python - 如何从 Django REST 框架后端到前端获取生成的 PIL 图像?
- node.js - HTTP 请求 JWT
- python - 在函数中包含 groupby 语句 - Python