Setting up Anaconda Python Programming Environment on Ubuntu

This tutorial will help you in setting up a Anaconda Python 3 programming environment on Ubuntu 22.04. (Should also work on previous release Ubuntu 20.04 as well). If you do not have Ubuntu 22.04 installed on your machine, you can follow the detailed description of installing Ubuntu 22.04 Desktop in the following link below.

Majority of GNU/Linux distribution including Ubuntu 22.04 and other versions of Debian Linux ship with Python 3 pre-installed. You can check whether Python is installed or not by issuing the following command in the terminal. To launch the terminal press Ctrl+Alt+t

$ python3 -V

You’ll receive output in the terminal window that will let you know the version number. While this number may vary, the output will be similar to this:

Anaconda Distribution

Anaconda Distribution equips individuals to easily search and install thousands of Python/R packages and access a vast library of community content and support. Especially with Python being very popular and de-facto platform for Data Science. Also it provides good graphical IDEs like Spyder and Jupyter Notebook.

Download Anaconda Distribution

If you want to install Anaconda Distribution on your system, you can download it from its official webpage. .It is available for Linux, Mac, Windows platforms. Download the suitable version based on your operating system.

Install Anaconda Distribution

Headover to the folder where it is was downloaded. Open a terminal and navigate to the folder. Run the 3 commands as shown in the diagram below.

The installer proceeds to setup the Anaconda distribution. Choose to perform the default action yes whenever prompted.

Launch Anaconda Distribution

Once installed open a terminal and run the following command to launch Anaconda Navigator.

putta:~$ anaconda-navigator 

Once the Anaconda is up and running as shown below. Next in Anaconda Navigator choose Spyder IDE. Click on the launch button below it to start the IDE.

Using Spyder IDE

The Spyder IDE appears as shown below. Type a Python program and save it with .py extension. A sample program is shown below.

Then click on Run button (green triangle button) to execute the program. If the program has any errors they
are shown on console on the bottom right section. Otherwise the program starts executing and output is shown in
the console sub window. A sample is shown below.

Prabodh C P is a faculty in the Dept of CSE SIT, Tumkur and also currently a Research Scholar pursuing PhD in IIT Hyderabad. He conducts online classes for C, C++, Python. For more info call +919392302100

Leave a Reply

Your email address will not be published. Required fields are marked *