您好,我在构建python映像时遇到问题
错误说,
> [8/9] RUN pip install -r requirements.txt:
#12 9.084 Collecting azure-iot-device~=2.0.0
#12 9.262 WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)'))': /packages/3f/a2/380aa87ade47fcdc8b39503bb36f0a3ab16a9667b7134219b021c2ae5633/azure_iot_device-2.0.1-py2.py3-none-any.whl
#12 9.886 WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)'))': /packages/3f/a2/380aa87ade47fcdc8b39503bb36f0a3ab16a9667b7134219b021c2ae5633/azure_iot_device-2.0.1-py2.py3-none-any.whl
#12 11.01 WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)'))': /packages/3f/a2/380aa87ade47fcdc8b39503bb36f0a3ab16a9667b7134219b021c2ae5633/azure_iot_device-2.0.1-py2.py3-none-any.whl
#12 13.15 WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)'))': /packages/3f/a2/380aa87ade47fcdc8b39503bb36f0a3ab16a9667b7134219b021c2ae5633/azure_iot_device-2.0.1-py2.py3-none-any.whl
#12 17.32 WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)'))': /packages/3f/a2/380aa87ade47fcdc8b39503bb36f0a3ab16a9667b7134219b021c2ae5633/azure_iot_device-2.0.1-py2.py3-none-any.whl
#12 17.49 ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/3f/a2/380aa87ade47fcdc8b39503bb36f0a3ab16a9667b7134219b021c2ae5633/azure_iot_device-2.0.1-py2.py3-none-any.whl (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)')))
#12 17.49
#12 19.10 WARNING: You are using pip version 21.0.1; however, version 21.1 is available.
#12 19.10 You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
------
executor failed running [/bin/sh -c pip install -r requirements.txt]: exit code: 1
但是当升级pip时,同样的错误显示。
错误:由于环境原因无法安装程序包错误:HTTPSConnectionPool(host='files.pythonhosted.org',port=443):url超过最大重试次数:/packages/ac/cf/0cc542fc93de2f3b9b53cb979c7d118cffb93204afb4629a9f858e113f/pip-21.1-py3-none-any。whl(由SSLError(SSLCertVerificationError(1),[SSL:CERTIFICATE\u Verification\u FAILED]CERTIFICATE Verification FAILED:无法获取本地颁发者证书(\u SSL.c:1123'))引起)
我尝试运行pip安装--trusted host=pypi。pythonorg--trusted host=pypi。org--trusted host=files。蟒蛇座。组织需求。txt,在我的docker文件中,但它对我没有帮助。
我尝试过,卸载所有python解释器并重新安装,但结果相同。
我们没有使用代理服务器,我可以ping文件。蟒蛇座。妥善组织
希望你有人能帮我。谢谢你。
验证证书是否到位。
~ $ python3.7 -c "import ssl; print(ssl.get_default_verify_paths())"
DefaultVerifyPaths(
cafile='/etc/pki/tls/cert.pem',
capath='/etc/pki/tls/certs',
openssl_cafile_env='SSL_CERT_FILE',
openssl_cafile='/etc/pki/tls/cert.pem',
openssl_capath_env='SSL_CERT_DIR',
openssl_capath='/etc/pki/tls/certs')
Rails/Ruby/OpenSSL不允许我发送电子邮件,为什么? 控制台中的测试: 结果错误: “SSL\u connect返回=1 errno=0 state=错误:证书验证失败(无法获取本地颁发者证书)(OpenSSL::SSL::SSLError)” 我的证书路径: 我的环境: 铁轨6.1.4.1 红宝石3.0.1p64 OpenSSL 1.1.1f 编辑:这将建立工作连接:
我正在尝试使用python从web获取数据。我导入了urllib。请求包,但在执行时,我得到错误: 我正在Mac OS High Sierra上使用Python 3.7 当我将URL更改为“http”时,我能够获取数据。但是,我相信,这可以避免检查SSL证书。 因此,我在互联网上查找并找到了一个解决方案:运行 这解决了我的问题。但是我对SSL之类的东西一无所知。你能帮我理解它到底做了什么来解决我的
错误 ssl。SSLCertVerificationError:[SSL:证书\u验证\u失败]证书验证失败:无法获取本地颁发者证书(\u SSL.c:1056)验证证书时SSL握手失败 哎呀。客户例外。ClientConnectorCertificateError:无法连接到主机discordapp。com:443 ssl:True[SSLCertVerificationError:(1),[s
我试图使用来自Github(https://github.com/gto76/betbrain-scraper)的betbrain.py,其中包含以下代码: 但是,当运行时,它会返回此错误 我怎样才能解决这个问题?我在MacOS 10.12.1上运行Python 3.6.0
执行简单代码后: 我有下一个错误: Traceback(最近一次调用最后一次):文件"F:\Run\Lpror\Phyton\lib\site-包\urllib3\connectionpool.py",第597行,在urlopenf中。_prepare_proxy(conn)文件"F:\Run\Lpror\Phyton\lib\site-包\urllib3\connectionpool.py",第
- 我运行了此脚本,但出现了此错误。我怎么做?