警告:pip 配置了需要 TLS/SSL 的位置,但是 Python 中的 ssl 模块不可用

Imr*_*lla 9 python ssl pip kali-linux

我正在使用 Kali Linux 2020.1,我安装了 Python3.7,然后在尝试使用 pip3 命令安装模块后,我不断收到此错误消息。

  WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
    ERROR: Could not find a version that satisfies the requirement flask (from versions: none)
    ERROR: No matching distribution found for flask

    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("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
Run Code Online (Sandbox Code Playgroud)

小智 4

为此,我们必须编译它并安装每个依赖项

  • 以这种方式安装任何 python 模块都是不寻常的。您能否解释一下为什么它需要从源代码构建而不是通过主流渠​​道之一安装?例如:使用 apt 安装 (3认同)