conda安装python版本失败

问题:执行 conda create -n py37 python=3.7 anaconda出现以下错误
1、

CondaValueError: prefix already exists: D:\Anaconda3\envs\py37

很简单,根据提示,在Anaconda3\envs已经存在名为py37的python,删掉或者重命名就可以了

2、

Solving environment: failed

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

`$ D:\Anaconda3\Scripts\conda create -n py37 python=3.7 anaconda`

  environment variables:
                 CIO_TEST=<not set>
               CONDA_ROOT=D:\Anaconda3
                 HOMEPATH=\Users\49716
                     PATH=D:\Anaconda3;D:\Anaconda3\Library\mingw-w64\bin;D:\Anaconda3\Library\u
                          sr\bin;D:\Anaconda3\Library\bin;D:\Anaconda3\Scripts;C:\Windows\system
                          32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowe
                          rShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program
                          Files\Git\cmd;C:\Users\49716\AppData\Local\Microsoft\WindowsApps;
             PSMODULEPATH=C:\Users\49716\Documents\WindowsPowerShell\Modules;C:\Program Files\Wi
                          ndowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Mod
                          ules
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>

     active environment : None
       user config file : C:\Users\49716\.condarc
 populated config files : C:\Users\49716\.condarc
          conda version : 4.5.4
    conda-build version : 3.10.5
         python version : 3.6.5.final.0
       base environment : D:\Anaconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/win-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/pro/win-64
                          https://repo.anaconda.com/pkgs/pro/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : D:\Anaconda3\pkgs
                          C:\Users\49716\AppData\Local\conda\conda\pkgs
       envs directories : D:\Anaconda3\envs
                          C:\Users\49716\AppData\Local\conda\conda\envs
                          C:\Users\49716\.conda\envs
               platform : win-64
             user-agent : conda/4.5.4 requests/2.18.4 CPython/3.6.5 Windows/10 Windows/10.0.19041
          administrator : False
             netrc file : None
           offline mode : False


V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/msys2/win-64/repodata.json.bz2>
Elapsed: -

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.

If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.

SSLError(MaxRetryError('HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443): Max retries exceeded with url: /pkgs/msys2/win-64/repodata.json.bz2 (Caused by SSLError(SSLError("bad handshake: SysCallError(10054, \'WSAECONNRESET\')",),))',),)

A reportable application error has occurred. Conda has prepared the above report.
Upload did not complete.

镜像源的问题,修改.condarc文件就可以了
原本内容:

channels:
  - defaults
show_channel_urls: true
report_errors: true

删掉,改成:


channels:
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/win-64
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ 
ssl_verify: true
show_channel_urls: true

你可能感兴趣的:(问题解决,python,conda,开发语言)