0% found this document useful (0 votes)
30 views

Conda Setup

The document outlines the 7 steps to install MiniConda3 on Ubuntu 20.04: 1) update Ubuntu, 2) download the MiniConda script, 3) install MiniConda3 by running the script, 4) create and activate environments for projects, 5) install packages using Conda, 6) update Conda, and 7) uninstall MiniConda by deleting files and removing from PATH.

Uploaded by

Zubair Ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Conda Setup

The document outlines the 7 steps to install MiniConda3 on Ubuntu 20.04: 1) update Ubuntu, 2) download the MiniConda script, 3) install MiniConda3 by running the script, 4) create and activate environments for projects, 5) install packages using Conda, 6) update Conda, and 7) uninstall MiniConda by deleting files and removing from PATH.

Uploaded by

Zubair Ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Steps to install MiniConda3 on Ubuntu 20.

04 LTS
Before following this tutorial ensure that you have Python installed on your Ubuntu
system. Although, it would be because python version 3.x is already there on Ubuntu
20.04 out of the box. If not then you can use the APT package manager to install
it, here is the command- sudo apt install python3

1. Update Ubuntu 20.04


Well, this step is not necessary to install MiniConda because here we are going to
use the script available for it, officially. However, still to ensure the system is
up to date with available security updates for our Ubuntu 20.04 run the command
once.

sudo apt update && sudo apt upgrade

2. Download MiniConda Script


MiniConda is not available to install using the APT package manager and standard
repository of Ubuntu. Hence, we download the script published on the official
document website of Anaconda. Here is the command to directly download it using the
command terminal of Ubuntu 20.04.

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

3. Install MiniConda3 on Ubuntu 20.04


Now, we can install the MiniConda using the script for our current user.

bash Miniconda3-latest-Linux-x86_64.sh
Hit the Enter key to start the installation process. Soon, the installer will ask
to accept the License, press q, and then type Yes to accept it.

Trivia: In case you have activated the base environment of Condo to start every
time with terminal and now you want to deactivate it, then here is the command to
follow:

conda config --set auto_activate_base false


Close and reopen the terminal to start using the Conda package manager

5. How to create a New environment


Now, if you want to create an environment for your project with a particular python
version and libraries then here is the way to do that.

conda create -n myfirstenv python


In the MiniConda, Python 3 is denoted or set as default python.

Once created, you can activate the environment using the command:

conda activate myenv


Note: To deactivate the environment use:

conda deactivate

6. Use Conda to install the library for Python


If you want to use Conda package manager to install some other package or library
then here is the command syntax for that.

conda install package-name


For Example:

conda install numpy

7. How to update
To update the Conda package manager you can use its own command line:

conda update conda


7. Uninstall or Remove Miniconda3 – Ubuntu 20.04
To remove Miniconda3 from your Ubuntu 20.04, simply delete the folder containing
its files. After that remove it from your system $PATH as well.

rm -rf ~/miniconda3
Remove the Conda Initialize code from your bash profile.

nano ~/.bashrc
Find the lines shown in the screenshot and delete them.

Uninstall Miniconda3 Ubuntu 22.04

After that save the file using Ctrl+O, hit the Enter key, and use Ctrl+X.

Close the Terminal and start it again or simply source the Bash using:

source ~/.bashrc

You might also like