确认python 3.7中的ssl模块,ssl模块不可用

时间:2019-02-28 17:51:59

标签: python-3.x pip ssl-certificate

我尝试了许多针对不同版本发布的内容,但无法解决此问题。在脚本位置有什么要替换的吗?或添加任何代码?

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

this is the error i am geting

1 个答案:

答案 0 :(得分:-1)

我相信这是同样的错误。

"pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available"

解决方案是:

“我可以通过添加具有libeay32.dll的python的目录路径来解决此问题(在我的情况下为C:\ Users \ Gabriel \ Anaconda3 \ pkgs \ openssl-1.1.1a-he774522_0 \ Library \ bin)在系统环境中处于最高位置。”

https://stackoverflow.com/a/54531318/2747958