Could not fetch URL https://pypi.org/simple/opencv-python/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/opencv-python/ (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 opencv-python==4.3.0.38 (from versions: none) ERROR: No matching distribution found for opencv-python==4.3.0.38 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
时间: 2024-03-18 07:45:24 浏览: 162
Python解决pip install时出现的Could not fetch URL问题
5星 · 资源好评率100%
这个错误通常是由于 SSL 模块未正确安装或配置导致的。你可以尝试以下步骤来解决这个问题:
1. 确认你的 Python 版本是否正确安装了 OpenSSL 支持模块。
2. 确认你的 Python 版本是否正确安装了 pip 包管理器。
3. 尝试使用非安全连接(HTTP)来安装 opencv-python 包,使用以下命令:`pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org opencv-python==4.3.0.38 --user`。
4. 如果上述方法无效,可以尝试更新 pip 版本并重新安装 opencv-python 包,使用以下命令:`python -m pip install --user --upgrade pip` 和 `pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org opencv-python==4.3.0.38 --user`。
希望这些步骤可以帮助你解决问题。
阅读全文