python-3.x - 警告:pip 配置了需要 TLS/SSL 的位置
问题描述
我已经尝试了这个问题的所有答案,但到目前为止,它们都没有奏效。每当我使用 pip 时,我都会得到:
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
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
Requirement already up-to-date: pip in ./.virtualenvs/tensorflow/lib/python3.6/site-packages (20.0.2)
WARNING: 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
几天前我安装了新的 Catalina OS (10.15.3)。如果我做:
(tensorflow) MBP-de-Hector-2:~ hectoresteban$ python -c "import ssl; print(ssl.OPENSSL_VERSION)"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 101, in <module>
import _ssl # if we can't import it, let the error propagate
ImportError: dlopen(/Users/hectoresteban/.virtualenvs/tensorflow/lib/python3.6/lib-dynload/_ssl.cpython-36m-darwin.so, 2): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
Referenced from: /Users/hectoresteban/.virtualenvs/tensorflow/lib/python3.6/lib-dynload/_ssl.cpython-36m-darwin.so
Reason: image not found
解决方案
推荐阅读
- ffmpeg - ffmpeg 无法将 mp4 转换为 mp3 输出文件 #0 不包含任何流
- postgresql - “org.hibernate.PersistentObjectException:分离的实体传递给持久化”错误经过大量研发后没有得到解决
- swift - 核心数据数据删除
- jquery - 可变高度水平手风琴
- git - 每当在远程分支中完成 git 提交时,如何生成电子邮件?
- graphics - BlueSky Statistics 中的图形图像大小
- javascript - HTML 滚动到 div 菜单
- kentico - 电子邮件主题编码
- php - 如何从数据库中选择多个值
- tfs - 自动从 TFS 的包含更改中排除特定文件