[Deep Learning] Install and configure Anaconda

1. Install under Windows

Since Anaconda integrates most of the python packages, it is very convenient to start using. Due to the slow download speed of the network, it is recommended to use a mirror to improve the download speed. For how to use the image, please refer to: Anaconda Image Documentation .

  1. Find the installation file that suits you here, and then download it; for example
    : https://mirrors.bfsu.edu.cn/anaconda/archive/Anaconda3-2020.11-Windows-x86_64.exe
  2. Follow the instructions and install Anaconda.

2. Install under Linux

Download the latest conda installation file from the website, for example:

wget https://mirrors.bfsu.edu.cn/anaconda/archive/Anaconda3-2020.11-Linux-x86_64.sh

Then run:

bash ./Anaconda3-2020.11-Linux-x86_64.sh

Follow the prompts to complete the installation (remember to automatically add the environment variable settings), and finally restart the terminal.

3. Configure the software source

3.1 Set the conda software source

You can refer to conda installation and software source setting instructions .

Each system can modify the files in the user directory .condarc. Windows users cannot directly create .condarca file named , they can first execute conda config --set show_channel_urls yesto generate the file and then modify it.

Under Linux, open a file editor gedit ~/.condarcand copy the following content into this file:

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

3.2 Set PIP source

 pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

4. Install common software packages

Open condathe command line program of and enter the following command:

conda install jupyter scipy numpy sympy matplotlib pandas scikit-learn

Install PyTorch:

conda install pytorch -c pytorch 
pip3 install torchvision

Guess you like

Origin blog.csdn.net/LogosTR_/article/details/126443116