gpt4 book ai didi

python - 即使我能够安装其他库,安装 pyinstaller 时也会出现 SSL 错误

转载 作者:太空宇宙 更新时间:2023-11-03 14:25:41 24 4
gpt4 key购买 nike

我在一个公司环境中,我正在尝试为我的程序制作一个 .exe 文件。在这个企业环境中,我必须在安装库时使用代理。例如:


pip --proxy https://web-proxy.xxx.xxx.net:8080 install pyinstaller

我能够安装除 pyinstaller 之外的所有其他库

我什至尝试在另一个跳转站上安装该库(您仍然必须在其中使用公司代理),但我仍然无法安装。这是完整的回溯(请记住,我的公司仍在使用 python 2.7):

 ERROR: Complete output from command 'c:\python27\python.exe' 'c:\python27\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'c:\users\admini~1\appdata\local\temp\8\pip-build-env-m1s7oj\overlay' --no-warn-script-location --no-binary :none: --only-b
inary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel:
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting setuptools>=40.8.0
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, u'[SSL: TLSV1_ALERT_ACCESS_DENIED] tlsv1 alert access denied (_ssl.c:661)'),)': /simple/setuptools/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, u'[SSL: TLSV1_ALERT_ACCESS_DENIED] tlsv1 alert access denied (_ssl.c:661)'),)': /simple/setuptools/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, u'[SSL: TLSV1_ALERT_ACCESS_DENIED] tlsv1 alert access denied (_ssl.c:661)'),)': /simple/setuptools/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, u'[SSL: TLSV1_ALERT_ACCESS_DENIED] tlsv1 alert access denied (_ssl.c:661)'),)': /simple/setuptools/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, u'[SSL: TLSV1_ALERT_ACCESS_DENIED] tlsv1 alert access denied (_ssl.c:661)'),)': /simple/setuptools/
Could not fetch URL https://pypi.org/simple/setuptools/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/setuptools/ (Caused by SSLError(SSLError(1, u'[SSL: TLSV1_ALERT_ACCE
SS_DENIED] tlsv1 alert access denied (_ssl.c:661)'),)) - skipping
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
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLError(1, u'[SSL: TLSV1_ALERT_ACCESS_DENIED] tlsv1
alert access denied (_ssl.c:661)'),)) - skipping
----------------------------------------
ERROR: Command "'c:\python27\python.exe' 'c:\python27\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'c:\users\admini~1\appdata\local\temp\8\pip-build-env-m1s7oj\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https:
//pypi.org/simple -- 'setuptools>=40.8.0' wheel" failed with error code 1 in None


我在安装任何其他库时都没有得到那个回溯,只有这个。我想我必须回家并在那里安装它?

最佳答案

不清楚您要安装到哪个 Python 版本。在我的设置中,我还有一个 python2.7,它在我安装 pyinstaller 库时被调用。我在我的虚拟环境中使用 Python3.4(.venv)

你必须去你想安装pyinstaller的特定环境。例如

(.ven) C:\Python\Development>C:\Python\Development\.venv\Scripts\python -m pip install pyinstaller

这将从指定的环境中调用 python 并执行用于安装库的 pip 模块。

示例输出:

Collecting pyinstaller
Downloading https://files.pythonhosted.org/packages/e2/c9/0b44b2ea87ba36395483
a672fddd07e6a9cb2b8d3c4a28d7ae76c7e7e1e5/PyInstaller-3.5.tar.gz (3.5MB)
100% |################################| 3.5MB 148kB/s

关于python - 即使我能够安装其他库,安装 pyinstaller 时也会出现 SSL 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57431543/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com