python-3.x - 在 python 3.7 中确认 ssl 模块,ssl 模块不可用
问题描述
我尝试了许多针对不同版本发布的东西,但无法克服这个问题。脚本位置有什么要替换的吗?或添加任何代码?
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
解决方案
我相信这是同样的错误。
“pip 配置了需要 TLS/SSL 的位置,但是 Python 中的 ssl 模块不可用”
解决方案是:
“我可以通过在系统环境中添加具有 libeay32.dll(在我的情况下为 C:\Users\Gabriel\Anaconda3\pkgs\openssl-1.1.1a-he774522_0\Library\bin)作为最高位置的 python 的 dir 路径来解决这个问题。”
推荐阅读
- string - 使拆分字符串获取最后一个元素
- c++ - 一次读取 ULONG 的文件
- google-maps - 如何使用 VueJs 在谷歌地图中添加我的位置按钮?
- ios - 触发 iOS swift 的后台邮件
- spring-boot - Spring Boot 降级 postgres 版本
- java - 对象 [id=1] 不属于指定的子类
- regex - PowerShell 中的匹配字符串
- html - 重新定位后嵌入的视频移动
- .net - 来自 Visual Studio Xamarin 的相同源代码会在 iOS、Raspberry PI 和 LattePanda 上运行相同吗?
- azure - 如何在使用 ARM 模板部署 Azure Function 时添加 project.json 和 run.csx