首页 > 解决方案 > 如何使用 miniconda 在 Windows 10 上安装 aiohttp?

问题描述

我尝试了什么:

C:\Users\stiv\miniconda3\Scripts>conda install -c conda-forge aiohttp                                                                  Collecting package metadata (current_repodata.json): failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/conda-forge/win-64/current_repodata.json>
Elapsed: -

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
'https://conda.anaconda.org/conda-forge/win-64'

和点子:

C:\Users\stiv\miniconda3\Scripts>pip install aiohttp    
                                                                               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/aiohttp/                                                        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/aiohttp/                                                        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/aiohttp/                                                        
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/aiohttp/                                                       
 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/aiohttp/                                                        Could not fetch URL https://pypi.org/simple/aiohttp/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/aiohttp/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping                                                                                                     ERROR: Could not find a version that satisfies the requirement aiohttp (from versions: none)                                           ERROR: No matching distribution found for aiohttp    
                                                                                 
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.                     
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                                                                                                              

我该如何解决它,或者还有其他选择吗?

标签: pythonsslpipanaconda

解决方案


当 PATH 中缺少某些库时会发生这种情况,请查看以下帖子,其中包含有关您需要添加到 PATH 的说明https://github.com/pypa/virtualenv/issues/1139


推荐阅读