为 Python 3.7 安装 auto-py-to-exe 模块 returns 在 Windows 上出错

Installing auto-py-to-exe module for Python 3.7 returns an error on Windows

我正在尝试使用以下命令安装 auto-py-to-exe 模块:

pip install auto-py-to-exe

但returns出现以下错误:

  ERROR: Command errored out with exit status 1:
   command: 'c:\users\ea_e90434\appdata\local\programs\python\python37-32\python.exe' 'c:\users\ea_e90434\appdata\local\programs\python\python37-32\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Us
ers\EA_E90~1\AppData\Local\Temp\pip-build-env-i1b74fjx\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --trusted-host pypi.org --trusted-host files.pythonhosted.org -- '
setuptools>=40.8.0' wheel
       cwd: None
  Complete output (8 lines):
  Collecting setuptools>=40.8.0
    WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0648D210>: Fail
ed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/
    WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0648D270>: Fail
ed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/
    WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0648D350>: Fail
ed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/
    WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0648D3F0>: Fail
ed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/
    WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0648D470>: Fail
ed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/
    ERROR: Could not find a version that satisfies the requirement setuptools>=40.8.0 (from versions: none)
  ERROR: No matching distribution found for setuptools>=40.8.0
  ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\ea_e90434\appdata\local\programs\python\python37-32\python.exe' 'c:\users\ea_e90434\appdata\local\programs\python\python37-32\lib\site-packages\pip' install --ignore-
installed --no-user --prefix 'C:\Users\EA_E90~1\AppData\Local\Temp\pip-build-env-i1b74fjx\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --trusted-host pypi.org --trust
ed-host files.pythonhosted.org -- 'setuptools>=40.8.0' wheel Check the logs for full command output.

从我在错误中读到的内容来看,这对我来说似乎是网络问题。 您能否在命令提示符下尝试简单的 ping 以确保其正常工作?
ping 8.8.8.8

也许您有需要禁用的防病毒/防火墙 - 只是暂时用于故障排除目的?

如果以上都没有问题,请尝试使用以管理员权限打开的命令 window 安装模块时使用的相同命令(右键单击 "command prompt",然后单击 "Execute as Administrator").

如果失败,您还可以使用以下命令安装从 github 存储库克隆它的模块:

$ git clone https://github.com/brentvollebregt/auto-py-to-exe.git
$ cd auto-py-to-exe
$ python setup.py install