我正在使用 python 3.6.8 和 pip3 开发 2D 游戏。一切都工作正常。然后我下载并安装了python 3.8。现在,pip 根本无法工作。这些是我在运行“pip3 install arcade”时遇到的错误:
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting arcade
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/arcade/
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/arcade/
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/arcade/
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/arcade/
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/arcade/
Could not fetch URL https://pypi.org/simple/arcade/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/arcade/ (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 arcade (from versions: none)
ERROR: No matching distribution found for arcade
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
请帮忙,我想继续制作我的游戏。
最佳答案
这个错误非常明显。您的 ssl
模块已损坏,因此您无法连接到 HTTPS 站 pip (例如 PyPI)。也许您安装了错误的 Python 版本,或者它是在运行时依赖于您没有兼容版本的库(如 OpenSSL)的情况下构建的。如果没有进一步的信息,我们无法知道是什么原因导致了问题,只能知道您安装的 Python 3.8 已损坏。
如果还没有适用于 Python 3.8 的 Mint 包,您可以随时 build it from source ,但请确保首先安装所有依赖项,否则您最终会遇到另一个损坏的安装。
关于python - 为什么 Python 升级到 3.8 后 Pip 无法运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58986284/