Windows 版本 Anaconda 配置加速源安裝軟件

C:\Users\lenovo\.condarc

首先安裝Anaconda最新版本。json

其次添加安裝目錄到環境變量。文本爲ui

C:\ProgramData\Anaconda3\Library\bin

運行 conda 命令在 Windows 用戶下生成文件 .condarcurl

#生成文件命令
conda config --set show_channel_urls yes

編輯文件,複製代碼到文件中。本文爲code

#C:\Users\lenovo\.condarc
#複製代碼內容以下
channels:
  - defaults
show_channel_urls: true
default_channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
custom_channels:
  conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

配置完成安裝軟件。ip

#首次安裝須要等待一段時間,本文舉例安裝scipy
Windows PowerShell
版權全部 (C) Microsoft Corporation。保留全部權利。

嘗試新的跨平臺 PowerShell https://aka.ms/pscore6

PS C:\Windows\system32> conda install scipy
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: C:\ProgramData\Anaconda3

  added / updated specs:
    - scipy


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    ca-certificates-2019.8.28  |                0         126 KB  defaults
    certifi-2019.9.11          |           py37_0         151 KB  defaults
    conda-4.8.1                |           py37_0         2.8 MB  defaults
    openssl-1.1.1d             |       he774522_2         4.8 MB  defaults
    scipy-1.3.1                |   py37h29ff71c_0        11.2 MB  defaults
    ------------------------------------------------------------
                                           Total:        19.2 MB

The following packages will be UPDATED:

  conda                      pkgs/main::conda-4.7.12-py37_0 --> anaconda/pkgs/main::conda-4.8.1-py37_0

The following packages will be SUPERSEDED by a higher-priority channel:

  ca-certificates                                 pkgs/main --> anaconda/pkgs/main
  certifi                                         pkgs/main --> anaconda/pkgs/main
  openssl                                         pkgs/main --> anaconda/pkgs/main
  scipy                                           pkgs/main --> anaconda/pkgs/main


Proceed ([y]/n)? y


Downloading and Extracting Packages
scipy-1.3.1          | 11.2 MB   | ############################################################################ | 100%
conda-4.8.1          | 2.8 MB    | ############################################################################ | 100%
ca-certificates-2019 | 126 KB    | ############################################################################ | 100%
certifi-2019.9.11    | 151 KB    | ############################################################################ | 100%
openssl-1.1.1d       | 4.8 MB    | ############################################################################ | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
PS C:\Windows\system32>
相關文章
相關標籤/搜索