Anaconda is the most popular python data science and machine learning platform for large-scale data processing, predictive analysis and scientific computing. The Anaconda distribution comes with more than 1,000 data packages, conda command line tools and Anaconda Navigator's desktop graphical user interface.
This tutorial will guide you through downloading and installing Anaconda Python Distribution on Ubuntu 18.04.
Download Anaconda
At the time of writing, the latest stable version of Anaconda is version 5.3.
Please select 64-Bit (x86) Installer to download the link: https://pan.baidu.com/s/1rNA9D8gaGHuIE0Ao_l5AQA Extraction code: uecd. Try not to use python2.7. Many libraries no longer provide python2.7 support.
Click on the link to download, and the information collection box will pop up, just close it.
Install Anaconda
$ sudo sh Anaconda3-5.3.0-Linux-x86_64.sh
[ sudo]andrew's password:
Welcome to Anaconda3 5.3.0
In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue>>> #Press enter
... # Press the space several times to read the license.
Do you accept the license terms?[yes|no][no]>>> yes #Enter yes
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below
...[ /home/andrew/anaconda3]>>>/usr/local/anaconda3 #Enter a custom directory
... # Depending on the performance of the machine, the installation usually takes a few minutes.
# Discuss DingTalk Group 21745728 QQ Group 144081101567351477
# This article address: https://www.jianshu.com/p/9fe9ff999234
Do you wish to proceed with the installation of Microsoft VSCode?[yes|no] #Choose no. Generally speaking, the built-in spyder and professional IDE wingIDE are better to use.
...
Do you wish the installer to initialize Anaconda3
in your /home/andrew/.bashrc ?[yes|no][no]>>> #Choose yes
Initializing Anaconda3 in/home/andrew/.bashrc
A backup will be made to:/home/andrew/.bashrc-anaconda3.bak
For this change to become active, you have to open a newterminal.
Thank you for installing Anaconda3!===========================================================================
Anaconda is partnered with Microsoft! Microsoft VSCode is a streamlined
code editor with support for development operations like debugging, task
running and version control.
To install Visual Studio Code, you will need:- Administrator Privileges
- Internet connectivity
Visual Studio Code License: https://code.visualstudio.com/license
Do you wish to proceed with the installation of Microsoft VSCode?[yes|no]>>> no
Add "export PATH=/usr/local/anconda3/bin:$PATH" to/etc/profile so that all users can use Anaconda python3.7 out.
Above.bashrc added the following content when it was installed just now:
# added by Anaconda3 5.3.0 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init'!!
__ conda_setup="$(CONDA_REPORT_ERRORS=false '/usr/local/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"if[ $?-eq 0]; then
\ eval "$__conda_setup"elseif[-f "/usr/local/anaconda3/etc/profile.d/conda.sh"]; then
." /usr/local/anaconda3/etc/profile.d/conda.sh"
CONDA_CHANGEPS1=false conda activate base
else
\ export PATH="/usr/local/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup~/.bashrc
# <<< conda init <<<
Verify installation
Load environment variables by logging in again or executing "source ~/.bashrc".
$ conda info
active environment : base
active env location :/usr/local/anaconda3
shell level :1
user config file :/home/andrew/.condarc
populated config files :
conda version :4.5.11
conda-build version :3.15.1
python version :3.7.0.final.0
base environment :/usr/local/anaconda3(read only)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/linux-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/pro/linux-64
https://repo.anaconda.com/pkgs/pro/noarch
package cache :/usr/local/anaconda3/pkgs
/home/andrew/.conda/pkgs
envs directories :/home/andrew/.conda/envs
/usr/local/anaconda3/envs
platform : linux-64
user-agent : conda/4.5.11 requests/2.19.1 CPython/3.7.0 Linux/4.15.0-36-generic ubuntu/18.04 glibc/2.27
UID:GID :1000:1000
netrc file : None
offline mode : False
$ python
Python 3.7.0(default, Jun 282018,13:15:42)[GCC 7.2.0]:: Anaconda, Inc. on linux
Type "help","copyright","credits" or "license"for more information.>>>
At this point, the installation is complete.
Update Anaconda
It is generally only needed when a new version is released.
$ conda update conda
$ conda update anaconda
Remove Anaconda
It is generally only needed when a new version is released.
$sudo rm -rf /usr/local/anaconda3
Delete above~/.bashrc and/etc/Profile modification
Clear hidden files: rm-rf ~/.condarc ~/.conda ~/.continuum
to sum up
So far, this article on the detailed steps of installing Anaconda on Linux (Ubuntu 18.04) is introduced. For more related Linux installation of Anaconda, please search for the previous articles of ZaLou.Cn or continue to browse related articles below. Hope you will support more in the future. ZaLou.Cn!
Recommended Posts