Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conda update fails with SSL error CERTIFICATE_VERIFY_FAILED

Tags:

conda

I have a problem with conda update. Specifically, I tried doing

conda update <package> 

, and I got the following error:

Could not connect to https://repo.continuum.io/pkgs/free/osx-64/decorator-4.0.2-py27_0.tar.    bz2 Error: Connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed  (_ssl.c:590): https://repo.continuum.io/pkgs/free/osx-64/decorator-4.0.2-py27_0.tar.bz2 

The full output of the command was the following:

conda update bokeh Fetching package metadata: SSL verification error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) .SSL verification error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) .SSL verification error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) .SSL verification error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) . Solving package specifications: . Package plan for installation in environment //anaconda:  The following packages will be downloaded:      package                    |            build     ---------------------------|-----------------     decorator-4.0.2            |           py27_0          11 KB     ipython_genutils-0.1.0     |           py27_0          32 KB     path.py-8.1.1              |           py27_0          45 KB     pexpect-3.3                |           py27_0          60 KB     pickleshare-0.5            |           py27_0           8 KB     simplegeneric-0.8.1        |           py27_0           6 KB     traitlets-4.0.0            |           py27_0          88 KB     ipython-4.0.0              |           py27_0         916 KB     jinja2-2.8                 |           py27_0         263 KB     tornado-4.2.1              |           py27_0         515 KB     bokeh-0.9.3                |       np19py27_0        14.3 MB     ------------------------------------------------------------                                            Total:        16.2 MB  The following NEW packages will be INSTALLED:      ipython_genutils: 0.1.0-py27_0         path.py:          8.1.1-py27_0         pexpect:          3.3-py27_0           pickleshare:      0.5-py27_0           simplegeneric:    0.8.1-py27_0         traitlets:        4.0.0-py27_0      The following packages will be UPDATED:      bokeh:            0.9.0-np19py27_0 --> 0.9.3-np19py27_0     decorator:        3.4.2-py27_0     --> 4.0.2-py27_0         ipython:          3.2.0-py27_0     --> 4.0.0-py27_0         jinja2:           2.7.3-py27_1     --> 2.8-py27_0           tornado:          4.2-py27_0       --> 4.2.1-py27_0      Proceed ([y]/n)? y  Fetching packages ... Could not connect to https://repo.continuum.io/pkgs/free/osx-64/decorator-4.0.2-py27_0.tar.bz2 Error: Connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590): https://repo.continuum.io/pkgs/free/osx-64/decorator-4.0.2-py27_0.tar.bz2  dendisuhubdy:finalproject dendisuhubdy$ brew link --force openssl Linking /usr/local/Cellar/openssl/1.0.2d_1... 1548 symlinks created dendisuhubdy:finalproject dendisuhubdy$ conda update bokeh Fetching package metadata: SSL verification error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) .SSL verification error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) .SSL verification error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) .SSL verification error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) . Solving package specifications: . Package plan for installation in environment //anaconda:  The following packages will be downloaded:      package                    |            build     ---------------------------|-----------------     decorator-4.0.2            |           py27_0          11 KB     ipython_genutils-0.1.0     |           py27_0          32 KB     path.py-8.1.1              |           py27_0          45 KB     pexpect-3.3                |           py27_0          60 KB     pickleshare-0.5            |           py27_0           8 KB     simplegeneric-0.8.1        |           py27_0           6 KB     traitlets-4.0.0            |           py27_0          88 KB     ipython-4.0.0              |           py27_0         916 KB     jinja2-2.8                 |           py27_0         263 KB     tornado-4.2.1              |           py27_0         515 KB     bokeh-0.9.3                |       np19py27_0        14.3 MB     ------------------------------------------------------------                                            Total:        16.2 MB  The following NEW packages will be INSTALLED:      ipython_genutils: 0.1.0-py27_0         path.py:          8.1.1-py27_0         pexpect:          3.3-py27_0           pickleshare:      0.5-py27_0           simplegeneric:    0.8.1-py27_0         traitlets:        4.0.0-py27_0      The following packages will be UPDATED:      bokeh:            0.9.0-np19py27_0 --> 0.9.3-np19py27_0     decorator:        3.4.2-py27_0     --> 4.0.2-py27_0         ipython:          3.2.0-py27_0     --> 4.0.0-py27_0         jinja2:           2.7.3-py27_1     --> 2.8-py27_0           tornado:          4.2-py27_0       --> 4.2.1-py27_0      Proceed ([y]/n)? y  Fetching packages ... Could not connect to https://repo.continuum.io/pkgs/free/osx-64/decorator-4.0.2-py27_0.tar.bz2 Error: Connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590): https://repo.continuum.io/pkgs/free/osx-64/decorator-4.0.2-py27_0.tar.bz2 

Please advise: what should I do to overcome this error?

like image 679
Dendi Suhubdy Avatar asked Nov 13 '15 18:11

Dendi Suhubdy


People also ask

How do I turn off SSL verification on Anaconda?

Use this option at your own risk. To disable SSL verification when using conda skeleton pypi , set the SSL_NO_VERIFY environment variable to either 1 or True (case insensitive).


1 Answers

Conda needs to know where to find you SSL certificate store.

conda config --set ssl_verify <pathToYourFile>.crt 

No need to disable SSL verification.

This command add a line to your $HOME/.condarc file or %USERPROFILE%\.condarc file on Windows that looks like:

ssl_verify: <pathToYourFile>.crt 

If you leave your organization's network, you can just comment out that line in .condarc with a # and uncomment when you return.

If it still doesn't work, make sure that you are using the latest version of curl, checking both the conda-forge and anaconda channels.

like image 103
user6020015 Avatar answered Oct 22 '22 20:10

user6020015