gpt4 book ai didi

python - 环境错误 : HTTPSConnectionPool while pip install on docker container

转载 作者:行者123 更新时间:2023-12-02 18:34:59 26 4
gpt4 key购买 nike

我只是从 https://github.com/puckel/docker-airflow 运行 docker-compose但由于我需要一个额外的 python 包,我尝试在运行 docker exec -it <containerId> bash 后手动安装它但我有以下错误:

image

Defaulting to user installation because normal site-packages is not writeable
Collecting pymssql
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])"))': /packages/be/09/455835d22f84636dc646f4dc6afcc79c226d8bc253ef767ca8a922eec74a/pymssql-2.1.4-cp37-cp37m-manylinux1_x86_64.whl
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])"))': /packages/be/09/455835d22f84636dc646f4dc6afcc79c226d8bc253ef767ca8a922eec74a/pymssql-2.1.4-cp37-cp37m-manylinux1_x86_64.whl
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])"))': /packages/be/09/455835d22f84636dc646f4dc6afcc79c226d8bc253ef767ca8a922eec74a/pymssql-2.1.4-cp37-cp37m-manylinux1_x86_64.whl
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])"))': /packages/be/09/455835d22f84636dc646f4dc6afcc79c226d8bc253ef767ca8a922eec74a/pymssql-2.1.4-cp37-cp37m-manylinux1_x86_64.whl
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])"))': /packages/be/09/455835d22f84636dc646f4dc6afcc79c226d8bc253ef767ca8a922eec74a/pymssql-2.1.4-cp37-cp37m-manylinux1_x86_64.whl
ERROR: Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/be/09/455835d22f84636dc646f4dc6afcc79c226d8bc253ef767ca8a922eec74a/pymssql-2.1.4-cp37-cp37m-manylinux1_x86_64.whl (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))

在我能够运行 pip install pymssql 之前的几天没有问题。不知道为什么现在会发生这种情况,没有对 docker-compose.yml 文件进行任何更改,也没有在网上进行更改

最佳答案

我在 2020 年 8 月 16 日遇到了同样的错误。注意到 https://files.pythonhosted.org SSL证书于8月13日颁发。然后我登录到容器并检查日期,日期是 8 月 12 日。这就是 SSL 验证失败的原因。如果您在 Windows 上,请重新启动 docker 桌面以与主机同步时间。但这会杀死你正在运行的容器。如果您不想杀死正在运行的容器,则必须手动更新 docker 容器内的时间。

关于python - 环境错误 : HTTPSConnectionPool while pip install on docker container,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61010429/

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