Search code examples
pythonopensslanaconda

"OpenSSL 3.0's legacy provider failed to load"


When I started Anaconda Prompt (Anaconda3),the following error message floats and I could not figure out hhow to resolve it. "Error while loading conda entry point: conda-content-trust (OpenSSL 3.0's legacy provider failed to load. This is a fatal error by default, but cryptography supports running without legacy algorithms by setting the environment variable CRYPTOGRAPHY_OPENSSL_NO_LEGACY. If you did not expect this error, you have likely made a mistake with your OpenSSL configuration.)"

I have tried many proposed solutions from (https://stackoverflow.com) and others and none of them resolve the issue.


Solution

  • conda install cryptography
    
    • If you are using linux / Mac then add this command to .bashrc or .zshrc file

    export CRYPTOGRAPHY_OPENSSL_NO_LEGACY=1 and then run

    source ./bashrc or ./zshrc 
    
    • If you are using Window Under "System variables",
    • click "New..." and add CRYPTOGRAPHY_OPENSSL_NO_LEGACY as the variable name and 1 as the value. Click "OK" to save the changes.