Table of contents
Preface
Introduction to Anaconda
Aanconda is a Python data science and machine learning development platform based on conda
Including Conda, Python and a lot of installed tool packages, such as: numpy, pandas, etc.
conda is an open source package and environment manager that can be used to install different versions of software packages and their dependencies on the same machine, and can switch between different environments.
In short, installing anaconda can facilitate machine learning and data analysis. And there is no need to install python, which is more convenient.
(Normally, it is not recommended to install Anaconda again after installing multiple pythons, as it can easily lead to version confusion)
Features
-
Advantages: Facilitates Python data science and machine learning, installs it once, no need to download third-party libraries one by one
-
Disadvantages: The software is large and will cause functional redundancy.
1. Download the installation package
1.1 Direct download from the official website
First of all, we can go to the anaconnda official website to download the installation package. However, because it is a foreign website, the download speed is very slow, and the download fails from time to time, so it is not recommended to go to the official website to download the installation package .
It is recommended to choose the second method to download
After entering the official website download address, an interface will appear. You can click Download directly to download, or you can scroll to the bottom to select the version (Windows seems to only have the latest version by default)
1.2 Download from Tsinghua Mirror Network
Download address
You can check the version information here and choose the version that is newer and suitable for your operating system.
Scroll to the bottom to select the latest version to install.
Click the download link and wait for the download to complete
2. Installation
Click to start the downloaded installation program
Next (Next)
Agree to the agreement (I Agree)
You can choose here according to your actual situation. If there are multiple users using this machine, you can choose All Users (subsequent operations require administrator authorization), otherwise just choose the default (Just Me). Then click Next
Select the installation path. It is best not to install on the C drive. Click Browse... to browse the path and select it.. Then go to the next step (Next)
Something to note here, the first box is not checked by default. Choose according to your own situation
-
If this machinepython is not installed,CanCheck. This will automatically add anaconda to the system environment variables, eliminating the need to add it manually, which is more convenient. If it is not checked, you will need to manually add anaconda to the environment variables later.
-
ifAlready installed python,At onceDon't check, otherwise the original default python will be changed to the python that comes with Anaconda, which is equivalent to the original python not working. If you want to retain additional (outside of this software) use of original python, leave it unchecked.
Click Install and wait for installation
You can ignore this and just go to the next step.
These two boxes are optional (no need to check them)
. If you check them and then Finish, two browser windows will pop up to view relevant product information on the official website.
Uncheck them and then Finish to end the installation.
You can directly find the relevant startup program in the menu location (otherwise it will be more troublesome to find it in the installation file yourself). It is recommended to right-click the mouse and select Open File Location, and drag the shortcut to the desktop for easy access later.
3. Configuration
3.1 Configure environment variables
(If Python is not installed on this machine and Automatically add environment variables has been checked, just skip this step)
Right click on this computer and open properties
Find advanced system settings
Click on environment variables
Select path in the system variables and double-click to modify it.
Add the following path(Modify according to your own path)
D:\anaconda\anaconda3
D:\anaconda\anaconda3\Library\mingw-w64\bin
D:\anaconda\anaconda3\Library\usr\bin
D:\anaconda\anaconda3\Library\bin
D:\anaconda\anaconda3\Scripts
3.2 Verify installation
anaconda verification
Open the terminal and enter the following command to check whether the installation is complete
conda// 查看软件相关信息
conda -V //查看安装版本
Open the anaconda software interface:
python version verification
Enter python or other commands in the terminal that comes with anaconda, and it will search for matching files and programs in the anaconda file.
Check whether the original python version is overwritten:
it is found that it is not covered, and it is completed!
3.3 anaconda settings
Change conda source
Since the official anaconda server is abroad, when we need to download other third-party libraries, it is best to change the source to increase the download speed.
Open the powershell that comes with anaconda and enter the following command
-
Change the source warehouse to Tsinghua mirror source
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/ //设置搜索时显示通道地址 conda config --set show_channel_urls yes
-
Check whether the channel modification is completed
conda config --show channels
-
Restore default source
conda config --remove-key channels
-
Delete the original mirror source
conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/tensorflow/linux/cpu/
-
Add new mirror source
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/tensorflow/linux/cpu/
4. Completely uninstall
Super detailed detailed tutorial on completely uninstalling Anaconda