在代理防火墙后面安装pyinstaller时出错 - setuptools的二次安装

问题描述 投票:0回答:1

我正在尝试在我公司的代理后面安装pyinstaller。我使用标准的“pip install - proxy userid:[email protected]:port pyinstaller”,这一切都很有效。问题是在pyinstaller安装中,它也尝试安装setuptools包,但是当从https://pypi.org/simple调用pip时,它显然没有给它代理的凭据,setuptools的安装失败导致我的pyinstaller包安装到失败。

有没有其他人遇到这个问题,并有如何解决这个问题的建议,所以我可以在我的机器上得到pyinstaller?我实际上已经在我的site-packages中有了setuptools包,所以我不需要那个包但我不知道我是否可以告诉pyinstaller不要尝试安装setuptools。

C:\Users\dt24358\Downloads>pip install pyinstaller-3.4.tar.gz
Processing c:\users\dt24358\downloads\pyinstaller-3.4.tar.gz
  Installing build dependencies ... error
  Complete output from command c:\users\dt24358\python.exe c:\users\dt24358\lib\site-packages\pip install --ignore-installed --no-user --prefix c:\temp\pip-build-env-8cil1gjv\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 0x047903B0>, '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 0x047904D0>, '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 0x047905F0>, '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 0x04790450>, '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 0x04790350>, '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

  ----------------------------------------
Command "c:\users\dt24358\python.exe c:\users\dt24358\lib\site-packages\pip install --ignore-installed --no-user --prefix c:\temp\pip-build-env-8cil1gjv\overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel" failed with error code 1 in None
python-3.x pyinstaller
1个回答
2
投票

在命令行/终端中,请在执行该命令之前设置代理。

命令如下:

这将解决您的问题。您可以将它们设置为您的环境变量,这样您就不必担心它。

© www.soinside.com 2019 - 2024. All rights reserved.