【问题标题】:Python SSL module is not available on mac?Python SSL 模块在 Mac 上不可用?
【发布时间】:2020-05-02 13:41:33
【问题描述】:

好的,我需要在我的 mac 上安装 opencv 4,所以我跟着 https://www.pyimagesearch.com/2018/08/17/install-opencv-4-on-macos/ 安装了 opencv 并设置了虚拟环境 cv

我正在运行 Python 3.7.3。由于设置了这个,由于 SSL 问题,我无法安装任何软件包。在workon cv 之后尝试pip install spell -

Could not fetch URL https://pypi.org/simple/spell/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/spell/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement spell (from versions: none)
ERROR: No matching distribution found for spell

我尝试过 brew 卸载 openssl 并重新安装,以及其他 SO 解决方案,如 "ssl module in Python is not available" 但我在 macos 上而不是在 linux 上。

如何安装 pip 包?

【问题讨论】:

标签: python python-3.x macos opencv pip


【解决方案1】:

您的系统上可能同时安装了 Python2.7 和 Python3。 试试

pip --version

如果结果是这样的:

pip 19.3.1 from /usr/local/lib/python2.7/site-packages/pip (python 2.7)

您的 pip 默认为 Python2

那就试试吧

pip3 install spell

【讨论】:

    猜你喜欢
    • 2020-02-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-07-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-11-29
    相关资源
    最近更新 更多