获取诗歌SSLError添加networkx cmd



我正在使用诗歌(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。

  1. 使用浏览器连接到任何https网站

  2. 点击https://左侧的锁定图标

  3. 查看并保存根证书

  4. 将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"

  5. 在记事本/记事本++中打开my_cert.pem。复制文本

  6. 找到您的cacert.pem。在我的情况下,它位于下方的路径中

    C:Users<my_username>.poetrylibpoetry_vendorpy3.9certificacert.pem

  7. 将步骤5中复制的文本粘贴到cacert.pem并保存

  8. 运行poetry add <package-name>

最新更新