CONDA failed to create environment (collecting package metadata(repodata.json): failed)

conda command can refer to: [conda commonly used command collation]

1, problem

failed to create environment using conda creation-name py3.6.8 python==3.6.8. At the first step: Collecting package metadata (repodata.json): failed has failed.

below is the related log:

Collecting package metadata (repodata.json): failed

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "/usr/local/anaconda3/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 453, in wrap_socket
        cnx.do_handshake()
      File "/usr/local/anaconda3/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1915, in do_handshake
        self._raise_ssl_error(self._ssl, result)
      File "/usr/local/anaconda3/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1639, in _raise_ssl_error
        raise SysCallError(errno, errorcode.get(errno))
    OpenSSL.SSL.SysCallError: (104, 'ECONNRESET')

version information for:

2, Solution

search data, guess and conda version may be related, this idea comes from [conda issues-9004]. Conda is degraded with the command

conda config --set allow_conda_downgrades true
conda install conda=4.6.14

after the downgrade, the conda creation-name py3.6.8 python==3.6.8 environment was created successfully. The problem was solved successfully.

other

several frequently used conda commands, more can refer to [conda commonly used command consolidation]

  • conda install -n py3.6 python==3.6
  • conda activate py3.6.8
  • 0 conda deactivate1

    2

  • 3 4 conda install nb_conda5 // install Conda -envs conda info –envs // view all conda environments
  • conda list // view conda’s existing installation packages

Read More: