The latest Anaconda3 installation configuration and use tutorial (detailed process)


insert image description here

Anaconda is an open source Python distribution that includes more than 180 scientific packages such as conda, Python, and its dependencies.
Anaconda + Jupyter is basically the standard development environment for most machine learning/data analysis developers.

To the point:


1. Anaconda download

Method 1: Download from the official website

Download address portal:

Simply select the appropriate installer

insert image description here

Method 2: Tsinghua mirror download (recommended)

The download on the official website is slow and easy to break. It is recommended to use the following Tsinghua mirroring method:

After opening, you can find the latest version download by Date sorting
insert image description here

Here, the speed of downloading through the official website and the mirror is measured separately. The measured mirror is about twice as fast , of course, depending on different network environments. .

insert image description here


2. Anaconda installation

After downloading, it is the same as normal software installation.
insert image description here
Here is an example of the Windows version:
insert image description here

select user
insert image description here

Here you don't need to select Add sys path, just check Register. It is recommended to manually configure SysPath after installation to avoid configuration problems in later use.
insert image description here

Wait for the completion, the next step
insert image description here
insert image description here
does not need to select the last two, click Finish to complete the installation
insert image description here

You can see that after installation, in addition to Anaconda, Jupyter, Spyder, etc. are also included by default

insert image description here


3. Anaconda configuration

3.1 Configure environment variables

Open the computer's advanced system configuration:
insert image description here
insert image description here
click on the system environment variable
insert image description here

Find the following System Variables -> Path, then click Edit or double-click directly

insert image description here

Add the installation directory and the corresponding bin directory into it, as shown below, to complete the configuration
insert image description here

After that, you can simply enter the conda command through cmd to check whether the installation configuration is successful:

insert image description here

At the same time, you can see that the version of python is already the version with conda:
insert image description here

3.2 Configure domestic mirror source

Continue in cmd and configure it as Tsinghua source by entering the following command:


conda config --add channels    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels    https:// mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

  • 1
  • 2
  • 3
  • 4
  • 5

insert image description here


4. Using Anaconda

Open Anaconda Navigator:
insert image description here
startup is a bit slow
insert image description here

Or open the Prompt command line and use conda cmd
insert image description here

Navigator is started and completed
insert image description here
. Once installed, you can click Launch, for example, click on Jupyter:
insert image description here

Next, click Environment in the left column to create a new virtual environment for development.

(The virtual environment can be understood as just a Folder of the system, in which you can install any package as your development directory, and isolate it from other Python packages without affecting each other, which is also the essence of conda)

If you use conda cmd, it is the same as the graphical page, using cmd is through conda create

  • conda create -n ObjectDetection python=3

insert image description here

If an HTTP network error is reported during the creation process, it may be that there is a default in the channel, which can be removed. Otherwise, the access speed of the default mirror source is too slow, resulting in timeout and failure of update and download.
insert image description here

insert image description here

Find the .condarc file (the user configuration file of the local conda) in the user root directory (C:\Users\username), open and delete the default configuration line in it.

insert image description here

If it still doesn't work, you can try to change the https of Tsinghua mirror source to http
insert image description here

Finally created:

insert image description here

Right-click to open the terminal of env, and you can develop in this environment:

insert image description here

insert image description here


5. Conda common commands

For details of cmd, please refer to the official website Doc:
https://docs.conda.io/projects/conda/en/latest/commands.html

insert image description here

  1. conda --version #Check the conda version to verify whether it is installed

  2. conda update conda #Update to the latest version, other related packages will also be updated

  3. conda update --all #Update all packages

  4. conda update package_name #Update the specified package

  5. conda create -n env_name package_name #Create a new environment named env_name, and install a package named package_name in this environment, you can specify the version number of the new environment, for example: conda create -n python2 python=python2.7 numpy
    pandas, Created a python2 environment, the python version is 2.7, and also installed the numpy pandas package

  6. source activate env_name #Switch to env_name environment

  7. source deactivate #Exit the environment

  8. conda info -e #Display all created environments

  9. conda create --name new_env_name --clone old_env_name #复制old_env_name为new_env_name

  10. conda remove --name env_name --all #delete the environment

  11. conda list #View all installed packages

  12. conda install package_name #Install the package in the current environment

  13. conda install --name env_name package_name #Install the package in the specified environment

  14. conda remove – name env_name package #Delete the package in the specified environment

  15. conda remove package #delete the package in the current environment

  16. conda create -n tensorflow_env tensorflow

conda activate tensorflow_env #conda installs the CPU version of tensorflow

  1. conda create -n tensorflow_gpuenv tensorflow-gpu

conda activate tensorflow_gpuenv #conda installs the GPU version of tensorflow


Recommended articles by bloggers:

A reading series:

LoRa Mesh series:

Network Security Series:

Embedded development series:

AI/Machine Learning Series:


insert image description here

Tags: The latest Anaconda3 installation configuration and use tutorial (detailed process)

Machine Learning python anaconda

Related: The latest Anaconda3 installation configuration and use tutorial (detailed process)