python - .pip 配置了需要 TLS/SSL 的位置,但是 Python 中的 ssl 模块不可用。 (Windows 10)

标签 python python-3.x ssl pip quandl

我正在尝试安装 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/

相关文章:

python - sys.argv 和 argv 的区别?

python 3 : Searching A Large Text File With REGEX

java - 如何让信任 anchor 在 Android API 级别 16-19 上正常工作

python - 最知名的用户交叉匹配事件算法是什么?

python - Graphviz 边的默认标签

python - 在python中设置循环迭代器变量= 0

python-3.x - 名称错误 : name 'MediaIoBaseDownload' is not defined

security - 从 HTTP 页面发送登录凭据是否安全?

python - Python 中的证书存储库

python - Matplotlib 不显示图像