配置可信主机的setuptools的

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

当我打电话pip install的PyPI将资源库和不受信任的证书,我可以用--trusted主机选项跳过SSL验证:

$ pip install googleapis-common-protos --index-url https://maven.mycompany.org/artifactory/api/pypi/pypi-virtual/simple --trusted-host maven.mycompany.org
Looking in indexes: https://maven.mycompany.org/artifactory/api/pypi/pypi-virtual/simple
Collecting googleapis-common-protos
  Downloading https://maven.mycompany.org/artifactory/api/pypi/pypi-virtual/packages/61/29/1549f61917eadd11650e42b78b4afcfe9cb467157af4510ab8cb59535f14/googleapis-common-protos-1.5.6.tar.gz
...
Installing collected packages: googleapis-common-protos
Successfully installed googleapis-common-protos-1.5.6

然而,在使用时setuptools的,我看不出有任何选项来配置它:

$ python setup.py test
running pytest
Searching for googleapis-common-protos==1.5.3
Reading https://maven.mycompany.org/artifactory/api/pypi/pypi-virtual/simple/googleapis-common-protos/
Authenticating as uploader for https://maven.mycompany.org/artifactory/api/pypi/pypi-virtual/simple/googleapis-common-protos/ (from .pypirc)
Download error on https://maven.mycompany.org/artifactory/api/pypi/pypi-virtual/simple/googleapis-common-protos/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726) -- Some packages may not be found!
python pip setuptools
1个回答
1
投票

setuptools使用easy_install引擎盖下,和easy_install没有这样的选项。看到

python setup.py easy_install --help

--trusted-host仅适用于pip

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