{"id":14701,"date":"2022-02-02T06:26:42","date_gmt":"2022-02-02T06:26:42","guid":{"rendered":"https:\/\/linuxways.net\/?p=14701"},"modified":"2022-02-02T06:26:42","modified_gmt":"2022-02-02T06:26:42","slug":"how-to-install-anaconda-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/how-to-install-anaconda-on-ubuntu-20-04\/","title":{"rendered":"How to Install Anaconda on Ubuntu 20.04"},"content":{"rendered":"<h2>What is Anaconda?<\/h2>\n<p>In simple terms, Anaconda is an open-source package and environment manager that houses thousands of predictive analysis, machine learning, and data science packages. Its purpose is to provide scientific libraries and dependencies for Python programmers. Anaconda is frequently used for the development of machine learning and artificial intelligence applications.<\/p>\n<p>Anaconda makes package distribution and administration easier. It comes with various tools such as conda and Jupyter Notebook that provide you with a smooth and fast package and environment development. Anaconda also supports the creation of a basic, controllable environment, making any project deployment straightforward.<\/p>\n<p>In this article, you will learn how to install, use, and remove Anaconda from your Ubuntu operating system.<\/p>\n<h2>Prerequisites<\/h2>\n<ul>\n<li>Ubuntu 20.04 or any other Linux-based distribution<\/li>\n<li>Terminal access<\/li>\n<li>A user account with root or sudo privileges.<\/li>\n<li>Internet access<\/li>\n<\/ul>\n<p><strong>Note:<\/strong> Although the commands used in this tutorial are specifically for the Ubuntu system, all the methods are also valid for any other Linux-based system.<\/p>\n<h2>Install Dependency Packages<\/h2>\n<p>To use Anaconda Navigator, you need to install the following packages. Anaconda Navigator is a QT-based graphical interface that is highly convenient on the desktop.<\/p>\n<pre>sudo apt install libgl1-mesa-glx libegl1-mesa libxrandr2 libxss1 libxrandr2 libxcursor1 libasound2 libxcomposite1 libxi6 libxtst6<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1261\" height=\"468\" class=\"wp-image-14702\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-24.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-24.png 1261w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-24-300x111.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-24-1024x380.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-24-768x285.png 768w\" sizes=\"auto, (max-width: 1261px) 100vw, 1261px\" \/><\/p>\n<h2>Download the Anaconda Installation File<\/h2>\n<p>Next, download the installation file for Anaconda using the following wget command.<\/p>\n<pre>wget -P \/tmp https:\/\/repo.anaconda.com\/archive\/Anaconda3-2021.11-Linux-x86_64.sh<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1260\" height=\"442\" class=\"wp-image-14703\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-25.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-25.png 1260w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-25-300x105.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-25-1024x359.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-25-768x269.png 768w\" sizes=\"auto, (max-width: 1260px) 100vw, 1260px\" \/><\/p>\n<p>It is recommended to take and compare the SHA256 hash of the downloaded file with the <a href=\"https:\/\/docs.anaconda.com\/anaconda\/install\/hashes\/lin-3-64\/\">official file HASH <\/a>to prove that your file is authentic.<\/p>\n<p>Use the following SHA256sum command to get the hash of the downloaded file.<\/p>\n<pre>sha256sum \/tmp\/Anaconda3-2021.11-Linux-x86_64.sh<\/pre>\n<h2>Install Anaconda<\/h2>\n<p>Run the downloaded shell script and install Anaconda using the following bash command.<\/p>\n<pre>bash \/tmp\/Anaconda3-2021.11-Linux-x86_64.sh<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1264\" height=\"615\" class=\"wp-image-14704\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-26.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-26.png 1264w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-26-300x146.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-26-1024x498.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-26-768x374.png 768w\" sizes=\"auto, (max-width: 1264px) 100vw, 1264px\" \/><\/p>\n<p>During installation, you will be prompted to accept the licence terms. Type <strong>yes<\/strong> to proceed.<\/p>\n<p>Next, select the location of the installation and hit <strong>Enter<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1067\" height=\"324\" class=\"wp-image-14705\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-27.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-27.png 1067w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-27-300x91.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-27-1024x311.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-27-768x233.png 768w\" sizes=\"auto, (max-width: 1067px) 100vw, 1067px\" \/><\/p>\n<p>Once installation is finished, Initialise the anaconda using the conda init by typing <strong>yes <\/strong>and proceed. Conda is a command-line package manager for Anaconda. Conda inti will not only initialise the anaconda, but it will also add itself to the system variable <strong>PATH<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1195\" height=\"407\" class=\"wp-image-14706\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-28.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-28.png 1195w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-28-300x102.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-28-1024x349.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-28-768x262.png 768w\" sizes=\"auto, (max-width: 1195px) 100vw, 1195px\" \/><\/p>\n<p>Run the following command to fetch your bashrc file.<\/p>\n<pre>source ~\/.bashrc<\/pre>\n<p>Type <strong>conda <\/strong>or <strong>conda info <\/strong>in your terminal to verify anaconda installation.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1129\" height=\"559\" class=\"wp-image-14707\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-29.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-29.png 1129w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-29-300x149.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-29-1024x507.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-29-768x380.png 768w\" sizes=\"auto, (max-width: 1129px) 100vw, 1129px\" \/><\/p>\n<h2>Open Conda Navigator<\/h2>\n<p>You can now launch Conda Navigator from your system&#8217;s applications. Or you can simply type <strong>anaconda-navigator <\/strong>in your terminal.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1300\" height=\"522\" class=\"wp-image-14708\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-30.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-30.png 1300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-30-300x120.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-30-1024x411.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-30-768x308.png 768w\" sizes=\"auto, (max-width: 1300px) 100vw, 1300px\" \/><\/p>\n<h2>Update Anaconda<\/h2>\n<p>You can update the anaconda using the following command.<\/p>\n<pre>conda update anaconda<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1009\" height=\"563\" class=\"wp-image-14709\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-31.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-31.png 1009w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-31-300x167.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-31-768x429.png 768w\" sizes=\"auto, (max-width: 1009px) 100vw, 1009px\" \/><\/p>\n<p>Or you can update all the packages of Anaconda using:<\/p>\n<pre>conda update --all<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1228\" height=\"591\" class=\"wp-image-14710\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-32.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-32.png 1228w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-32-300x144.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-32-1024x493.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-32-768x370.png 768w\" sizes=\"auto, (max-width: 1228px) 100vw, 1228px\" \/><\/p>\n<h2>Create the Anaconda Environment<\/h2>\n<p>You can create a new anaconda environment using the following command.<\/p>\n<pre>conda create \u2013\u2013name &lt;environment-name&gt; python=3<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1149\" height=\"529\" class=\"wp-image-14711\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-33.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-33.png 1149w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-33-300x138.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-33-1024x471.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-33-768x354.png 768w\" sizes=\"auto, (max-width: 1149px) 100vw, 1149px\" \/><\/p>\n<h2>Activate the Anaconda Environment<\/h2>\n<p>To activate the anaconda environment, run:<\/p>\n<pre>conda activate &lt;environment-name&gt;<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1062\" height=\"125\" class=\"wp-image-14712\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-34.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-34.png 1062w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-34-300x35.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-34-1024x121.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-34-768x90.png 768w\" sizes=\"auto, (max-width: 1062px) 100vw, 1062px\" \/><\/p>\n<p>Similarly, when not in use, you can deactivate your environment.<\/p>\n<pre>conda deactivate<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"979\" height=\"113\" class=\"wp-image-14713\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-35.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-35.png 979w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-35-300x35.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-35-768x89.png 768w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><\/p>\n<h2>Uninstall Anaconda from Your System<\/h2>\n<p>It is not recommended to uninstall Anaconda directly as it will leave the system configuration settings and files.<\/p>\n<h3>Install Anaconda Clean<\/h3>\n<p>To remove all the anaconda configuration files, you need to install the following package.<\/p>\n<pre>conda install anaconda-clean<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1117\" height=\"593\" class=\"wp-image-14714\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-36.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-36.png 1117w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-36-300x159.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-36-1024x544.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-36-768x408.png 768w\" sizes=\"auto, (max-width: 1117px) 100vw, 1117px\" \/><\/p>\n<p>Now, remove the configuration files:<\/p>\n<pre>anaconda-clean<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1055\" height=\"210\" class=\"wp-image-14715\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-37.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-37.png 1055w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-37-300x60.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-37-1024x204.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-37-768x153.png 768w\" sizes=\"auto, (max-width: 1055px) 100vw, 1055px\" \/><\/p>\n<p>You can retrieve any important data later from the backup directory.<\/p>\n<h3>Remove Anaconda<\/h3>\n<p>Now you can remove Anaconda using the following rm command.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1139\" height=\"180\" class=\"wp-image-14716\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-38.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-38.png 1139w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-38-300x47.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-38-1024x162.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-38-768x121.png 768w\" sizes=\"auto, (max-width: 1139px) 100vw, 1139px\" \/><\/p>\n<h3>Remove Anaconda from the PATH Variable<\/h3>\n<p>Open the bashrc file.<\/p>\n<pre>nano ~\/.bashrc<\/pre>\n<p>Next, find and delete the <strong>conda initialize<\/strong> block.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1134\" height=\"745\" class=\"wp-image-14717\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-39.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-39.png 1134w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-39-300x197.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-39-1024x673.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/02\/word-image-39-768x505.png 768w\" sizes=\"auto, (max-width: 1134px) 100vw, 1134px\" \/><\/p>\n<p>Now you have removed anaconda from your system.<\/p>\n<h2>Conclusion<\/h2>\n<p>This article will show you how to install and use Anaconda on your Ubuntu system. Anaconda is a free and open-source Python and R programming language distribution. The Python interpreter is included, as are several data science and machine learning packages.<\/p>\n<p>Anaconda saves time as it ensures all the team members are working with the same packages and dependencies independent of the underlying operating system. It provides easy integration with complex tools like tensor flow and Keras.<\/p>","protected":false},"excerpt":{"rendered":"<p>What is Anaconda? In simple terms, Anaconda is an open-source package and environment manager that houses thousands of predictive analysis, machine learning, and data science packages. Its purpose&hellip;<\/p>","protected":false},"author":1,"featured_media":14792,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[481,100],"class_list":["post-14701","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu","tag-anaconda","tag-ubuntu-20-04"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/14701","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=14701"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/14701\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/14792"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=14701"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=14701"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=14701"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}