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

时间:2019-08-09 13:51:10

标签: python ssl pyinstaller

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


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

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

我什至尝试将库安装在另一个Jump Station(您仍必须使用公司代理)中,但仍然无法安装。这是完整的追溯信息(请记住,我的公司仍然使用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


在安装任何其他库时,只有该库,我没有得到该追溯。我想我必须回家并将其安装在那儿?

1 个答案:

答案 0 :(得分:0)

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

您必须转到要安装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