我正在尝试安装 quandl 以在 Jupyter 笔记本中使用。 py -m pip install quandl
但是我得到以下错误,Python 中的 SSL 模块不可用。
Collecting quandl
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/quandl/
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/quandl/
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/quandl/
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/quandl/
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/quandl/
Could not fetch URL https://pypi.org/simple/quandl/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/quandl/ (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 quandl (from versions: none)
ERROR: No matching distribution found for quandl
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```
*******************************************************************************************************
I tried using the following, but nothing worked
```py -m pip install --trusted-host=pypi.org --trusted-host=files.pythonhosted.org --user quandl```
最佳答案
如果您使用的是 Anaconda,请在环境路径中添加以下内容:-
D:\Anaconda3;
D:\Anaconda3\Scripts;
D:\Anaconda3\Library\bin;
关于python - .pip 配置了需要 TLS/SSL 的位置,但是 Python 中的 ssl 模块不可用。 (Windows 10),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59511241/