python - "pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available"

标签 python download openssl pip anaconda

我有 anaconda 包并运行 Spyder。这是我的系统信息:

anaconda                  2018.12                  py37_0

Python                    3.7.1

pip                       18.1

Dell Inspiron 13 7000 64-bit

我无法在命令提示符下使用 pip 安装任何东西。例如,我在尝试安装 numpy 时得到以下信息(我已经通过 anaconda 安装了):

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

Requirement already satisfied: numpy in c:\users\uday rallabhandi\anaconda3\lib\site-packages (1.15.4)

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

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

请帮助我理解为什么会这样。

最佳答案

这是我使用 Anaconda 在 Windows 10 上纠正错误的过程:

  1. 在我的环境变量中添加了以下路径:
    • /AppData/Local/Continuum/Anaconda3
    • /AppData/Local/Continuum/Anaconda3/Scripts
    • /AppData/Local/Continuum/Anaconda3/Library
    • /AppData/Local/Continuum/Anaconda3/Library/Bin

在这个阶段,错误信息仍然存在。

  1. 我从 Anaconda Prompt 安装了最新版本的 pip:

    python -m pip install --upgrade pip

这似乎更正了 DLL 冲突。

关于python - "pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54394764/

相关文章:

python解码部分utf-8字节数组

python - 在http服务器中处理客户端请求

python - python/numpy 一个数字连续出现多少次而没有中断或数字变化

security - SSL 客户端如何验证服务器的证书?

linux - 如何在非阻塞套接字上处理 OpenSSL SSL_ERROR_WANT_READ/WANT_WRITE

Python将十进制转换为十六进制

Java:尝试从服务器下载 jar 文件:线程 "main"java.io.IOException 中出现异常:服务器返回 HTTP 响应代码:URL 为 403

download - wget 如何仅下载文件的较新版本

c++ - 在基于自定义 Qt 的更新程序中下载验证

ssl - s_client 和 gethostbyname 失败