python-3.xanacondaopensshzstandard

Issue with Anaconda (OpenSSL & zstandard )


I am facing issues while running conda init in Anaconda. The following error occurs:

C:\Windows\System32>conda init  
Error while loading conda entry point: anaconda-cloud-auth  
(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.)  

Error while loading conda entry point: conda-content-trust  
(PyO3 modules compiled for CPython 3.8 or older may only be initialized once per interpreter process)  

C:\Users\rupes\anaconda3\Lib\site-packages\conda_package_streaming\package_streaming.py:25:  
UserWarning: zstandard could not be imported. Running without .conda support.  
`warnings.warn("zstandard could not be imported. Running without .conda support.")`  

C:\Users\rupes\anaconda3\Lib\site-packages\conda_package_handling\api.py:29:  
UserWarning: Install zstandard Python bindings for .conda support  
`_warnings.warn("Install zstandard Python bindings for .conda support")`  

After running the command, I see multiple "no change" messages:

no change C:\Users\rupes\anaconda3\Scripts\conda.exe  
no change C:\Users\rupes\anaconda3\Scripts\conda-env.exe  
no change C:\Users\rupes\anaconda3\Scripts\conda-script.py  
... (similar messages for other files)  

I also checked the registry:

HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun  
No action taken.  

What I Have Tried

I have tried multiple solutions but still can't resolve the problem. Any suggestions?


Solution

  • Have you tried to Fix zstandard Import Warning, If not then try installing it manually:

    conda install -c conda-forge zstandard
    

    Then, try running:

    conda init
    

    If still not resolved,

    Try updating Python inside Conda:

    conda install python=3.9`
    

    Then, restart your terminal and check if conda init runs properly.

    Since OpenSSL 3.0’s legacy provider is failing to load, you can try setting the required environment variable.

    1. Open Command Prompt (cmd) as Administrator and run:

    setx CRYPTOGRAPHY_OPENSSL_NO_LEGACY 1

    1. Close and restart the terminal, then try running conda init again.

    and Run:

    conda install -c anaconda openssl
    

    Then, update Conda:

    conda update conda
    conda update --all