Fix conda SSLError: Can’t connect to HTTPS URL because the SSL module is not available – Anaconda Tutorial

By | May 9, 2022

If you are using conda command and encounter CondaHttpError or SSL module is not available, which is a big probelm. In this tutorial, we will introduce how to fix it.

condahttperror

Step 1: Add anaconda to windows environment

You can read this tutorial to do.

A Simple Guide to Add conda Command into Windows PATH Environment – Python Tutorial

Step 2: Add **\Anaconda3\Library\bin to windows environment

add anaconda to windows path environment

Step 3: Open a new windows command prompt window

Run conda command and you will find this ssl error is fixed.

fix condahttperror

However, if this error is not fixed. you can continue.

Step 4: Set a conda channel in .condarc file

The default anaconda channel is repo.anaconda.com, this url may can not be visited in some countries. We can add a alternative one.

Here is the tutorial:

A Beginner’s Guide to Add and Remove Anaconda Channels – Anaconda Tutorial

If this error is still existing, you should set ssl_verify: false

Here is an example:

channels:
  - https://mirrors.aliyun.com/anaconda/pkgs/main
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - https://mirrors.aliyun.com/anaconda/pkgs/free
show_channel_urls: true
ssl_verify: false

Then you will find this error will be fixed.

Leave a Reply