2023 conda installation, configuration environment variables, source change

0. Uninstall cleanly before installing

1. Download the installation package

Don’t use the mirror to download this, the official website is very fast

Free Download | Anacondahttps://www.anaconda.com/download

2. Install the software

First NEXT, then I Agree

Come to this page and select All Users below, and then go down

Choose the installation path

The suggestion is to directly change C to D. The following suggestions are consistent with mine. You can directly copy mine to configure environment variables.

The second meaning is to register conda as the system python, depending on personal needs, it is fine.

It seems that this place cannot choose to add environment variables, you have to manually add

waiting to install

At this point, do not tick the two FINISH

3. Set folder permissions

Otherwise, your new virtual environment may be C drive, because ordinary users do not have permission to change this folder

right click on this folder

 

Check the two permissions and confirm

need to wait for a while

OK to exit

4. Configure environment variables

 

 

 

 Find the PATH line, double-click

 Create the following 5 variables

D:\ProgramData\anaconda3 
D:\ProgramData\anaconda3\Scripts 
D:\ProgramData\anaconda3\Library\name-w64\bin
D:\ProgramData\anaconda3\Library\usr\bin 
D:\ProgramData\anaconda3\Library\bin

 Note: Be sure to make sure all windows are careful

5. Verify the installation

conda -V 

Note the capital V 

conda info

(I didn't change the folder permissions before, which resulted in envs directories on the C drive) 

6. Configure mirror source

Since the official warehouse is abroad, we will be faster with the domestic mirror image.

Tsinghua feels that the speed is not fast, and the average value is less than 1M

I use Nanjing University

Create a configuration file in this directory and write one of the following configurations at will:

C:\Users\<YourUserName>\.condarc

Tsinghua configuration 

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/r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
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
  pytorch-lts: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

Nanjing University configuration

channels:
  - defaults
show_channel_urls: true
default_channels:
  - https://mirror.nju.edu.cn/anaconda/pkgs/main
  - https://mirror.nju.edu.cn/anaconda/pkgs/r
  - https://mirror.nju.edu.cn/anaconda/pkgs/msys2
custom_channels:
  conda-forge: https://mirror.nju.edu.cn/anaconda/cloud
  msys2: https://mirror.nju.edu.cn/anaconda/cloud
  bioconda: https://mirror.nju.edu.cn/anaconda/cloud
  menpo: https://mirror.nju.edu.cn/anaconda/cloud
  pytorch: https://mirror.nju.edu.cn/anaconda/cloud
  pytorch-lts: https://mirror.nju.edu.cn/anaconda/cloud
  simpleitk: https://mirror.nju.edu.cn/anaconda/cloud

Ali

channels:
  - defaults
show_channel_urls: true
default_channels:
  - http://mirrors.aliyun.com/anaconda/pkgs/main
  - http://mirrors.aliyun.com/anaconda/pkgs/r
  - http://mirrors.aliyun.com/anaconda/pkgs/msys2
custom_channels:
  conda-forge: http://mirrors.aliyun.com/anaconda/cloud
  msys2: http://mirrors.aliyun.com/anaconda/cloud
  bioconda: http://mirrors.aliyun.com/anaconda/cloud
  menpo: http://mirrors.aliyun.com/anaconda/cloud
  pytorch: http://mirrors.aliyun.com/anaconda/cloud
  simpleitk: http://mirrors.aliyun.com/anaconda/cloud

run 

conda clean -i 

Clear the index cache and ensure that the index provided by the mirror site is used.

(It stands to reason that you haven't packed it, you shouldn't have it)

Finish

Guess you like

Origin blog.csdn.net/m0_52559040/article/details/130838584