我正在使用诗歌(1.0.10(来管理项目的依赖关系。
我当前在运行poetry add networkx
时遇到SSLError
[SSLError]
HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /pypi/networkx/json (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))
我似乎只是在networkx
中遇到了这个错误。有人能帮我弄清楚吗?这是我项目的一个关键依赖,如果可能的话,我想用诗歌。
提前谢谢。
这适用于windows。
-
使用浏览器连接到任何https网站
-
点击https://左侧的锁定图标
-
查看并保存根证书
-
将cert转换为.pem我使用了git附带的openssl。
cd C:Users<my_username>AppDataLocalProgramsGitusrbin>
./openssl x509 -in "C:Users<my_username><my_folder>my_cert.cer" -out "C:Users<my_username><my_folder>my_cert.pem"
-
在记事本/记事本++中打开my_cert.pem。复制文本
-
找到您的cacert.pem。在我的情况下,它位于下方的路径中
C:Users<my_username>.poetrylibpoetry_vendorpy3.9certificacert.pem
-
将步骤5中复制的文本粘贴到cacert.pem并保存
-
运行
poetry add <package-name>