Conda Update Condahttperror: Http None

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

(C:\Users\*****\AppData\Local\Continuum\Anaconda3) C:\Users\*****>conda update conda
Fetching package metadata ...

CondaHTTPError: HTTP None None for url <None>
Elapsed: None

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.
SSLError(SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),),)

I've repeated conda update conda over multiple days, with no change in results. I can see there is no HTTP, however conda info --a shows channel URLs.

(C:\Users\*****\AppData\Local\Continuum\Anaconda3) C:\Users\*****>conda info -a
Current conda install:

           platform : win-64
      conda version : 4.3.13
   conda is private : False
  conda-env version : 4.3.13
conda-build version : 2.1.5
     python version : 3.5.3.final.0
   requests version : 2.13.0
   root environment : C:\Users\*****\AppData\Local\Continuum\Anaconda3  (writable)
default environment : C:\Users\*****\AppData\Local\Continuum\Anaconda3
   envs directories : C:\Users\*****\AppData\Local\Continuum\Anaconda3\envs
                      C:\Users\*****\AppData\Local\conda\conda\envs
                      C:\Users\*****\.conda\envs
      package cache : C:\Users\*****\AppData\Local\Continuum\Anaconda3\pkgs
                      C:\Users\*****\AppData\Local\conda\conda\pkgs
       channel URLs : 
                      
                      
                      
                      
                      
                      
                      
                      
                      
        config file : C:\Users\*****\.condarc
       offline mode : False
         user-agent : conda/4.3.13 requests/2.13.0 CPython/3.5.3 Windows/7 Windows/6.1.7601

How do I get conda update to call a correct HTTP address?

1

21 Answers

Use the code below in your command line :

conda config --set ssl_verify no
3

My original answer got flagged as duplicate because I answered a similar question with the same answer, I wasn't aware that this is not allowed. I have marked my other response as a duplicate. Hopefully, this stays up!

I almost spent two days running in circles trying all the solutions I could find on the Internet, but here is what worked for me.

So, CondaHTTPError aka SSL module is not available error is caused by the missing/misplacement of libcrypto file in anaconda3/DLLs folder:

Tl;dr:

From anaconda3\Library\bin copy below files and paste them in anaconda3/DLLs:

-   libcrypto-1_1-x64.dll
-   libssl-1_1-x64.dll 

Detailed answer:

  1. Uninstall any Python versions you have (e.g. Python 3.7 or Python 3.8)

    go to Control Panel--> Program and Features--> Select Python-->

uninstall

  1. Uninstall any Anaconda versions you might have (e.g. Anaconda or miniConda) For Anaconda:

    go to Control Panel--> Program and Features--> Select Anaconda-->uninstall

    For miniConda

    go to Control Panel--> Program and Features--> Select miniconda--> uninstall

  2. Delete any leftover Environment variables

    go to Control Panel--> System--> Advanced System settings (on left side)--> in System Properties click on Environment Variables button--> in User Variable select Path and click the Edit button--> delete any path related to Anaconda, miniConda or Python.

    E.g.
    C:\Users\Bob \AppData\Local\Programs\Anaconda\...
    C:\Users\Bob \AppData\Local\Programs\miniconda\...
    

    b. If you don’t see any paths related to Anaconda, miniConda or Python; you are good to go.

  3. Reboot your machine

  4. Download the latest version of Anaconda

  5. Run the Installer; keep all the default settings

  6. Go to your anaconda3/library/bin folder:

    E.g.C:\Users\Bob\AppData\Local\Continuum\anaconda3\Library\bin

  7. Copy these files:

    libcrypto-1_1-x64.dll

    libssl-1_1-x64.dll

  8. paste these in anaconda3/DLLs folder:

  9. Reopen the Anaconda Prompt and test with any command that requires an Internet connection. E.g. conda update conda Or with conda update --all

6

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.

Or, as suggested by th0masb in the comments, using the command:

conda config --set ssl_verify false
5

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

1

Install the latest OpenSSl from this site: the current latest version is 1.1.1. Now I can install packages via pip and conda successfully.

1

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.

2

Type "conda config --show" to check the configuration information and make sure the addresses in the channels can be accessed normally.

Enable 'k' flag in your conda update command. For example,

conda update anaconda-navigator -k

That will allow conda to make insecure connections to download packages. This is especially useful when you are behind a proxy server.

0

I am using python 3.7.4 and I have just downloaded the conda and tried setting up the tensorflow but got http error. I tried several steps mentioned above but it dint solve my problem. I solved it by first activating conda. if you are using conda for first time you need to activate it using conda init command and then disable SSL verification conda config --set ssl_verify false After above steps my tfp setup worked perfectly!!!

0
  • Download cacert.pem from ,
  • save to /this/is/cert/path
  • open ~/.bashrc or any profile file you have
  • add export REQUESTS_CA_BUNDLE=/this/is/cert/path ...
  • open new terminal
  • conda update conda

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.

For the type of error above, you have to remove the proxy in environment variable. To do this follow this step :-

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.