conda update CondaHTTPError: HTTP None

后端 未结 17 772
无人共我
无人共我 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:19

    After reading FAR too many posts running around in circles, I found a simple solution at least to my flavor of this problem, which should also shed some light on root cause.

    Using sudo of same command (see below)
    

    conda create -n tensorenviron

    (output below) Solving environment: done

    CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/r/osx-64/repodata.json.bz2>
    Elapsed: -
    
    An HTTP error occurred when trying to retrieve this URL.
    HTTP errors are often intermittent, and a simple retry will get you on your way.
    
    If your current network has https://www.anaconda.com blocked, please file
    a support request with your network engineering team.
    
    SSLError(MaxRetryError('HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443): Max retries exceeded with url: /pkgs/r/osx-64/repodata.json.bz2 (Caused by SSLError("Can\'t connect to HTTPS URL because the SSL module is not available."))'))
    

    sudo conda create -n tensorenviron

    (output below) Password: Solving environment: done

    ## Package Plan ##
    
    environment location: /Users/damonw/anaconda3/envs/tensorenviron
    
    
    Proceed ([y]/n)? y
    
    Preparing transaction: done
    Verifying transaction: done
    Executing transaction: done
    #
    # To activate this environment, use:
    # > source activate tensorenviron
    #
    # To deactivate an active environment, use:
    # > source deactivate
    #
    
    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2020-12-07 17:24

    Refer link for details

    Please update to the latest version of Navigator.

    On Navigator click on the update button on the top right of the interface or on the terminal type

    $ conda update anaconda-navigator

    0 讨论(0)
  • 2020-12-07 17:26

    Try to start Anaconda Prompt as Administrator (click right button of mouse before starting it), and make the same order.

    0 讨论(0)
  • 2020-12-07 17:27

    Check if you're behind a corporate firewall that has an HTTPS/SSL proxy. If so you may need to change the line in .condarc from ssl_verify: true to ssl_verify: false.

    0 讨论(0)
  • 2020-12-07 17:28

    You should check your .condarc file located in your Miniconda3/Anaconda3 root directory. There should be a line with just a hyphen. This line corresponds to the None channel. Deleting the line fixed the issue for me.

    0 讨论(0)
提交回复
热议问题