簡體   English   中英

在 PyCharm 中安裝包的問題

[英]Problems with installing packages in PyCharm

我在 PyCharm 中安裝 Packages 時遇到問題。 我嘗試安裝 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\\Scripts; D:\\Anaconda3\\Library\\bin

大多數人只添加 D:\\Anaconda3\\Scripts;

Stolen from pip 配置了需要 TLS/SSL 的位置,但是 Python 中的 ssl 模塊不可用

我有一個類似的問題(我在 Mac 環境中)。 通過更新 openssl 解決了這個問題!!

brew upgrade openssl 

它還更新了我必須到 3.8 的 python 版本,因為依賴項所以我不得不在 Pycharm 中重新創建解釋器,因為它可以工作。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM