每次尝试出现以下错误时,我都无法使用python安装pyinstaller:
C:\Users\...\Documents\1Work\PCT\ExcelDiff>pip install pyinstaller
Collecting pyinstaller
Using cached https://files.pythonhosted.org/packages/03/32/0e0de593f129bf1d1e77eed562496d154ef4460fd5cecfd78612ef39a0cc/PyInstaller-3.4.tar.gz
Installing build dependencies ... error
Complete output from command c:\users\...\appdata\local\programs\python\python36-32\python.exe c:\users\...\appdata\local\programs\python\python36-32\lib\site-packages\pip install --ignore-installed --no-user --prefix C:\Users\...\AppData\Local\Temp\pip-build-env-pz5b1j1k\overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel:
Collecting setuptools
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x070D82D0>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/setuptools/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x070DCC10>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/setuptools/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x070DCC30>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/setuptools/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x070DCE50>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/setuptools/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x070DCD30>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/setuptools/
Could not find a version that satisfies the requirement setuptools (from versions: )
No matching distribution found for setuptools
答案 0 :(得分:0)
我在公司防火墙后面,并且有相同的问题。通常,我会通过使用--proxy参数调用pip来安装新的python软件包,但是对于pyinstaller来说,这还不够。
解决方案是,在调用pip之前,我必须在命令提示符会话中设置http_proxy和https_proxy环境变量。
在命令提示符下:
设置http_proxy = YourProxyAddress:YourProxyPort
设置https_proxy = YourProxyAddress:YourProxyPort
pip --proxy YourProxyAddress:YourProxyPort安装pyinstaller
答案 1 :(得分:0)
尝试以下安装方式可以使用python 3.7版
pip install pyinstaller==4.0 --no-build-isolation