Install and use Anaconda on ubuntu16.04

1. Introduction to Anaconda

Anaconda is a python distribution, including python and many common software libraries, and a package manager conda. Anaconda can be used to manage virtual environments of different python versions, and there is no need to install python separately.

2. Anaconda installation

Download link: https://www.anaconda.com/download/#linux
Insert picture description here
as shown in the figure above: python2.x and python3.x correspond to different anaconda versions.
Click 64-Bit (x86) Installer (652.5 MB) under python2.7 to download the 64-bit version. (You choose the corresponding version to download by yourself, the operation steps are the same).
Anaconda2-2019.10-Linux-x86_64.sh (the corresponding .sh file after the download is successful), copy it into ubuntu16.04.

3.1 The installation steps are as follows

Enter the upper-level directory where the installation package. Anaconda2-2019.10-Linux-x86_64.sh is located, open the terminal and enter the following command

bash 目录名/Anaconda2-2019.10-Linux-x86_64.sh

Insert picture description here
The interface as shown in the figure above appears, keep pressing enter, and a more reminder will appear, keep pressing enter until the interface shown in the figure below appears: Insert picture description here
enter yes, and then you will be prompted to install the Anaconda directory, the default is to enter (of course You can also enter the directory you specify, such as /home/xxx/anaconda2), and then start the installation. After the installation, you will be asked whether to add the bin of anaconda to the user's environment variables? Enter yes.Insert picture description here

4. Check if Anaconda is installed successfully

Reopen the terminal and enter: python is
Insert picture description here
installed successfully. If there is no problem with the above installation, and there is a problem in this step, just restart it.

View conda version

conda --version

Since the path of python will change after anacinda is installed successfully, you can use the following command to avoid possible errors

conda upgrade --all
which python #查看python安装路径

Guess you like

Origin blog.csdn.net/better_boy/article/details/107064259