繁体   English   中英

为什么将 Python 升级到 3.8 后 Pip 不工作?

[英]Why is Pip not working after upgrading Python to 3.8?

我正在使用 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 站点(如 PyPI)。 也许您安装了错误的 Python 版本,或者它是在运行时依赖于您没有兼容版本的库(如 OpenSSL)而构建的。 如果没有进一步的信息,我们无法知道是什么导致了问题,只能知道您安装的 Python 3.8 已损坏。

如果还没有适用于 Python 3.8 的 Mint package,您始终可以从源代码构建它,但请确保先安装所有依赖项,否则您最终会遇到另一个损坏的安装。

对于 Python 3.8,默认情况下可能未安装 pip。 他们推荐的一种潜在修复方法是运行以下命令。

python -m ensurepip --default-pip

如果您仍然面临问题,您可以在文档的帮助下仔细检查 Python 3.8 的配置过程。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM