gpt4 book ai didi

python - debian 8.2 中的 "pip is configured with locations that require TLS/SSL"

转载 作者:行者123 更新时间:2023-12-04 22:39:13 24 4
gpt4 key购买 nike

我正在连接到我通过 ssh 租用的虚拟服务器.
它的操作系统是 Debian 8.2。
我安装了python 3.7和 pip 。
当我想使用 pip 安装任何软件包时,我收到此错误:

pip install django

WARNING: pip is configured with locations that require TLS/SSL,however the ssl module in Python is not available. WARNING: Retrying(Retry(total=4, connect=None, read=None, redirect=None, status=None))after connection broken by 'SSLError("Can't connect to HTTPS URLbecause the SSL module is not available.")': /simple/django/ WARNING:Retrying (Retry(total=3, connect=None, read=None, redirect=None,status=None)) after connection broken by 'SSLError("Can't connect toHTTPS URL because the SSL module is not available.")': /simple/django/WARNING: Retrying (Retry(total=2, connect=None, read=None,redirect=None, status=None)) after connection broken by'SSLError("Can't connect to HTTPS URL because the SSL module is notavailable.")': /simple/django/ WARNING: Retrying (Retry(total=1,connect=None, read=None, redirect=None, status=None)) after connectionbroken by 'SSLError("Can't connect to HTTPS URL because the SSL moduleis not available.")': /simple/django/ WARNING: Retrying(Retry(total=0, connect=None, read=None, redirect=None, status=None))after connection broken by 'SSLError("Can't connect to HTTPS URLbecause the SSL module is not available.")': /simple/django/ Could notfetch URL https://pypi.org/simple/django/: There was a problemconfirming the ssl certificate: HTTPSConnectionPool(host='pypi.org',port=443): Max retries exceeded with url: /simple/django/ (Caused bySSLError("Can't connect to HTTPS URL because the SSL module is notavailable.")) - skipping ERROR: Could not find a version thatsatisfies the requirement django (from versions: none) ERROR: Nomatching distribution found for django WARNING: pip is configured withlocations that require TLS/SSL, however the ssl module in Python isnot available. Could not fetch URL https://pypi.org/simple/pip/: Therewas a problem confirming the ssl certificate:HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceededwith url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URLbecause the SSL module is not available.")) - skipping


我安装了 libssl-dev已经在尝试 pip install ssl不会有帮助,我得到同样的错误。
有任何想法吗?

最佳答案

您始终可以通过明确声明您信任 pypi.org 来跳过 https(风险自负)

pip install --trusted-host pypi.org django
您也可以将其放在 [global] 下的 pip.ini 文件中
[global]
trusted-host = pypi.org

关于python - debian 8.2 中的 "pip is configured with locations that require TLS/SSL",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64806437/

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