"pip配置了需要TLS/SSL的位置,但是Python中的ssl模块不可用". [英] "pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available"
问题描述
我有anaconda软件包并运行Spyder.这是我的系统信息:
I have the anaconda package and run Spyder. Here is my system information:
anaconda 2018.12 py37_0
Python 3.7.1
pip 18.1
Dell Inspiron 13 7000 64-bit
我无法从命令提示符下使用pip安装任何内容.例如,当尝试安装numpy时(通过anaconda已经拥有),我得到以下信息:
I am unable to install anything with pip from the command prompt. I get the following when trying to install numpy for instance (which I already have through 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
请帮助我理解为什么会这样.
Please help me understand why this is happening.
推荐答案
这是我在Windows 10上使用Anaconda纠正错误的过程:
Here was my process to correct the error, on Windows 10 with Anaconda:
- 为我的环境变量添加了以下路径:
- /AppData/Local/Continuum/Anaconda3
- /AppData/Local/Continuum/Anaconda3/Scripts
- /AppData/Local/Continuum/Anaconda3/Library
- /AppData/Local/Continuum/Anaconda3/Library/Bin
- Added the following paths to my environment variables:
- /AppData/Local/Continuum/Anaconda3
- /AppData/Local/Continuum/Anaconda3/Scripts
- /AppData/Local/Continuum/Anaconda3/Library
- /AppData/Local/Continuum/Anaconda3/Library/Bin
在此阶段,错误消息仍然存在.
At this stage, the error message was still there.
- 我从Anaconda Prompt安装了最新版本的pip:
- From Anaconda Prompt, I installed the latest version of pip:
python -m pip install --upgrade pip
python -m pip install --upgrade pip
这似乎可以纠正DLL冲突.
This appeared to correct the DLL conflict.
这篇关于"pip配置了需要TLS/SSL的位置,但是Python中的ssl模块不可用".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!