1)问题1
当我们使用 pip install auto-py-to-exe
命令时,得到报错信息为 Fatal error in launcher: Unable to create process using '"d:\python\python.exe" "D:\pycharm\python\Scripts\pip3.exe" install auto-py-to-exe': ???? ???????
解决方案
1)切换到 pip 的安装目录,如D:\pycharm\python\Scripts
2)在此处打开 Powershell 窗口
3)执行python pip.exe install SomePackage
进行安装
4)安装成功后执行 pip 仍报错,提示 pip 要升级
5)执行 python -m pip install --upgrade pip
6)升级成功后,再次执行 pip,就解决了
参考链接:解决Windows下python和pip命令无法使用的问题
2)问题2
当我们使用 pip install auto-py-to-exe
来安装工具时,会出现如下的错误:
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
解决方案
关闭梯子,然后重新开始 pip install …
参考链接:Python 3.7 安装 auto-py-to-exe 模块在 Windows 上返回错误