gpt4 book ai didi

python - 在 venv 中使用 pip (Windows 10)

转载 作者:行者123 更新时间:2023-12-04 22:40:00 25 4
gpt4 key购买 nike

我见过类似的问题,但我没有看到我的问题的明确解决方案:
我设置了一个 python 虚拟环境并想安装 python 库。我在 Windows 10 上使用 VisualStudio Code,使用 pip 安装时出现以下错误:

WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
重试5次后:
Could not fetch URL https://pypi.org/simple/opencv/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries 
exceeded with url: /simple/opencv/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
似乎解决方案是添加
D:\Anaconda3 
D:\Anaconda3\Scripts
D:\Anaconda3\Library\bin
到路径。在这里找到的解决方案:

https://stackoverflow.com/questions/45954528/pip-is-configured-with-locations-that-require-tls-ssl-however-the-ssl-module-in


但是由于我没有使用 anaconda 并且在虚拟环境中,所以我不能这样做吗?
那么我必须编辑activate.bat吗?如果是的话,究竟是什么方式。
我可以添加吗

最佳答案

安装 OpenSSL 对我有用。似乎dll的版本有问题。可以在此处找到更多信息,但这对我来说已经足够了。
https://stackoverflow.com/a/67653437/15980312

关于python - 在 venv 中使用 pip (Windows 10),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68533714/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com