conda update CondaHTTPError: HTTP None

后端 未结 17 849
无人共我
无人共我 2020-12-07 16:44

Midway through running Conda Update --all, the update stalled. Multiple packages had been updated. Now, when I run conda update --all or cond

17条回答
  •  醉话见心
    2020-12-07 17:21

    I faced the same problem on Mac OS X and with Miniconda. After trying many of the proposed solutions for hours I found that I needed to correctly set Condas environment to use the Root certificate that my company provided rather than the generic ones that Conda provides.

    Here is how I solved it:

    1. Open Chrome, got to any website, click on the lock icon on the left of the URL. Click on «Certificate» on the dropdown. In the next window you see a stack of certificates. The uppermost (aka top line in window) is the root certificate (e.g. Zscaler Root CA in my case, yours will very likely be a different one).
    2. Open Mac OS keychain, click on «Certificates» and choose among the many certificates the root certificate that you just identified. Export this to any folder of your choosing.
    3. Convert this certificate with openssl: openssl x509 -inform der -in /path/to/your/certificate.cer -out /path/to/converted/certificate.pem

    4. For a quick check set your shell to acknowledge the certificate: export REQUESTS_CA_BUNDLE=/path/to/converted/certificate.pem

    5. To set this permanently open your shell profile (.bshrs or e.g. .zshrc) and add this line: export REQUESTS_CA_BUNDLE=/path/to/converted/certificate.pem. Now exit your terminal/shell and reopen. Check again.

    You should be set and Conda should work fine.

    PS: I'm aware that OP works on Windows. Nonetheless I leave this solution here because I think it can help solving the underlying root cause.

提交回复
热议问题