pycharm导入包出错
报错代码 求解 这是使用pycharm的虚拟环境canda导入的报错信息Could not fetch URL https://pypi.org/simple/torch/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/torch/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/torch/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/torch/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/torch/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/torch/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/torch/
ERROR: Could not find a version that satisfies the requirement torch>=1.7 (from versions: none)
ERROR: No matching distribution found for torch>=1.7
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
本帖最后由 AirTed 于 2022-1-2 00:12 编辑
我觉得是证书的问题,但不是很确定,抱歉。
只能给你些文章作为参考,先修一修。
1. (https://blog.csdn.net/c20081052/article/details/107077451)
2. (https://blog.csdn.net/sinat_28442665/article/details/86658593)
3. (https://blog.csdn.net/weixin_44857413/article/details/106427601) 你是不是导入包的时候开了v!p!n,暂时关闭就可以了 这个问题就是http代{过}{滤}理的问题,关闭代{过}{滤}理就能解决。google一下很多解决方案 谷歌一下,stackoverflow就有答案,
https://stackoverflow.com/questions/45954528/pip-is-configured-with-locations-that-require-tls-ssl-however-the-ssl-module-in
For Windows 10 if you want use pip in normal cmd, not only in Anaconda prompt. you need add 3 environment paths. like the followings:
D:\Anaconda3
D:\Anaconda3\Scripts
D:\Anaconda3\Library\bin
most people only add D:\Anaconda3\Scripts
页:
[1]