When I try to install python on Windows using anaconda, I get the following error: SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC decryption failed or bad record mac (_ssl.c:2633) Anaconda Prompt Error
How can I fix?
I have already try to set ssl verification parameter to false using:
conda config --set ssl_verify false
This Pc is workstation so I can use it at another network.
I have tried doing the same on another laptop which is connected same Wlan Network. That works without any problem.
Here is a log if the error:
C:\\WINDOWS\\system32\>conda install -c conda-forge python
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan
environment location: C:\\ProgramData\\Anaconda3\\envs\\gkk
added / updated specs:
- keepalive
The following packages will be downloaded:
package | build
---------------------------|-----------------
python-3.10.4 |hcf16a7b_0_cpython 16.2 MB conda-forge
------------------------------------------------------------
Total: 16.2 MB
The following NEW packages will be INSTALLED:
bzip2 conda-forge/win-64::bzip2-1.0.8-h8ffe710_4
keepalive conda-forge/noarch::keepalive-0.5-pyhd8ed1ab_6
libffi conda-forge/win-64::libffi-3.4.2-h8ffe710_5
libzlib conda-forge/win-64::libzlib-1.2.11-h8ffe710_1013
pip conda-forge/noarch::pip-22.0.4-pyhd8ed1ab_0
python conda-forge/win-64::python-3.10.4-hcf16a7b_0_cpython
python_abi conda-forge/win-64::python_abi-3.10-2_cp310
setuptools conda-forge/win-64::setuptools-60.10.0-py310h5588dad_0
sqlite conda-forge/win-64::sqlite-3.37.1-h8ffe710_0
tk conda-forge/win-64::tk-8.6.12-h8ffe710_0
tzdata conda-forge/noarch::tzdata-2022a-h191b570_0
wheel conda-forge/noarch::wheel-0.37.1-pyhd8ed1ab_0
xz conda-forge/win-64::xz-5.2.5-h62dcd97_1
Proceed (\[y\]/n)? y
Downloading and Extracting Packages
python-3.10.4 | 16.2 MB | | 0%
SSLError(SSLError(1, '\[SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC\] decryption failed or bad record mac (\_ssl.c:2633)'))
I am expecting without error:
Preparing transaction: done Verifying transaction: done Executing transaction: done
Had this error when updating conda with:
conda update -n base -c defaults conda
which led to:
[SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2622)
[SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2622)
I found two downloads that had been stopped at lower percentages (mkl and markdown):
jupyter_server-1.23. | 399 KB | ############################################################################ | 100%
mkl-2023.1.0 | 155.6 MB | ###6 | 5%
executing-0.8.3 | 18 KB | ############################################################################ | 100%
snappy-1.1.9 | 2.2 MB | ############################################################################ | 100%
markdown-3.4.1 | 148 KB | ################################8 | 43%
numexpr-2.8.4 | 128 KB | ############################################################################ | 100%
It is likely that the SSL errors came just from these two broken downloads. That is why I reran the command, and it worked:
Downloading and Extracting Packages
mkl-2023.1.0 | 155.6 MB | ############################################################################ | 100%
markdown-3.4.1 | 148 KB | ################################################################################################################# | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: -
Windows 64-bit packages of scikit-learn can be accelerated using scikit-learn-intelex.
More details are available here: https://intel.github.io/scikit-learn-intelex
For example:
$ conda install scikit-learn-intelex
$ python -m sklearnex my_application.py
done
I did not need to change the ssl settings for this since I have not touched the settings before.
Though this more or less what the other answer also says, I try to make clearer that running again - with the ssl setting to true if you had changed it before - might be all that is needed.