无法使用 pip 命令安装 pyinstaller

无法使用 pip 命令安装 pyinstaller

错误输出:

pip install pyinstaller
installing build dependencies 
Collecting wheel
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001BEF10AD0F0>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/wheel/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001BEF10ADE48>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/wheel/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001BEF10BB518>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/wheel/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001BEF10BB320>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/wheel/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001BEF10BB7B8>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/wheel/
  Could not find a version that satisfies the requirement wheel (from versions: )
No matching distribution found for wheel

答案1

似乎pip无法连接到 PyPI(pip从那里下载 Python 包)。通常,您应该确保:

  • 您拥有有效的互联网连接并pip可以连接到外部网站。

  • pip已更新(pip install -U pip)。

pip从理论上讲,与/Python相关的证书也可能存在一些问题。

请注意,你可以手动下载 Python 软件包(通常捆绑为.whl文件tar.gz档案)并使用pip在本地安装它们(例如pip install pyinstaller-4.3.tar.gz)。

但请注意,PyInstaller 的最新版本依赖于许多其他 Python 包。这些目前似乎包括:


资源

相关内容