python - 在 PyCharm 中安装包的问题
问题描述
我在 PyCharm 中安装包时遇到问题。我尝试安装 SpeechRecognition 和其他软件包,但我总是得到这样的结果:
Collecting 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 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 is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
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 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.
我能做些什么?
解决方案
对于 Windows 10,如果您想在普通 cmd 中使用 pip,而不仅仅是在 Anaconda 提示符下。您需要添加 3 个环境路径。像这样:D:\Anaconda3; D:\Anaconda3\脚本;D:\Anaconda3\库\bin
大多数人只添加 D:\Anaconda3\Scripts;
推荐阅读
- python - 在分类列和数值列中一次替换缺失值
- laravel - Laravel 或 MySQL 正确的词
- python - Django模型保存两次
- ios - 从 '[[AnyHashable : Any]]' 转换为不相关的类型 '[AnyHashable : Any]' 总是失败
- android - Firebase android从表中获取所有内容
- docker - 如何禁用正在运行的 Docker 容器的网络?
- ios - 如何使用 Eureka 将单元格添加到 UITableViewController?
- javascript - 由于默认情况下未启用严格模式,如何在 Chrome 开发工具中访问“让”关键字?
- python - 在python中递归退出矩形
- automapper - 使用 AutoMapper 在 .NET Core 中找不到 AddAutoMapper