Installing the Anaconda Python Distribution on Linux

Installation Video


The Anaconda Python distribution contains the core Python programming language, the Spyder and JupyterLab IDEs and the most common libraries for data science such as numpy, pandas and matplotlib.

Installation on Linux requires a bash install of a .sh via the terminal and will work in popular Linux distributions such as Ubuntu, Mint, Fedora and DeepIn. Once installed the Anaconda Navigator has no shortcut on the applications menu but has to be ran using the terminal.

The Anaconda 2020-11 Python distribution addresses previous Linux installation issues with the Anaconda Navigator and the Spyder 4 IDE.

There are usually no installation issues on a clean install of Linux. Installation issues usually arise when there is an old Anaconda installation present. The uninstaller does not purge the system of all the old configuration files which may reintroduce a problem after a reinstallation if they are problematic. I have included additional instructions to uninstall and purge an old installation in this scenario.

Uninstalling Anaconda and Kite

Before installing Anaconda, you should remove any old Kite and Anaconda installation to prevent conflicts. Click show more for more details. Skip this section if on a clean install.

Open up files and go to your Home folder:

Select View and then Show Hidden Files:

Uninstalling Kite

Go to the .local folder:

Go to the share subfolder:

Go to the Kite subfolder:

Right click uninstall and rename to

Right click an empty space in the folder and select open in terminal:

Type in:


Close the Terminal.

Uninstalling Anaconda

Delete the following folders anaconda3, .anaconda, .cache, .conda, .ipython and .kite. Also delete the .condarc file:

Next go to the .config folder:

Delete the Kite, matplotlib and spyder-py3 folders:

Return to the Home folder and right click the .bashrc file and select Open with Text Editor:

Press [Ctrl] + [ f ] to open up find and search, look for conda. If the search results come up positive delete the conda initalize:

Then save the file:

You may wish to hide the hidden files again:

The old installation of Anaconda is now uninstalled:


Installing Anaconda

Go to the Anaconda website:

Select Download:

Download the Linux 64 Bit installer.

Select Save File and then OK:

Go to your Downloads folder, right click an empty space and select Open in terminal:

In the downloads folder right click the .sh file and copy the file name including the extension. Type in bash and then a space and paste in the file name. For example:


Then press [↵]

Next the license agreement will display. Annoyingly it will require you to press [↵] to proceed to each new line. Hold down [↵] to rapidly scroll down to the end of the license agreement.

Then type in:


And then press [↵] to accept the agreement and proceed with the install.

Type in [↵] to proceed with the default location:

Type in:


Then [↵] to run conda init.

Anaconda is now installed:

Close the terminal.

Updating Anaconda

To update the Anaconda Python distribution (including Spyder) to the latest version open a new terminal. Type in:

conda update anaconda

Type in:


You should now have the latest version of Anaconda:

It is worthwhile checking periodically for updates using the same command above.

Updating JupyterLab to the Latest Version

The version of JupyterLab preinstalled with the standalone Anaconda installer is outdated. Newer versions are available on conda forge (third party repositories). There are two versions, Version 2.x (current) and Version 3.x (development). To update to the latest Version 3.0 (new features) instead open the Terminal and type in:

conda install -c conda-forge jupyterlab=3

Type in:


It is worthwhile checking periodically for updates using the same command above.

Installing Kite

It is recommended to install Kite here as this will save time during the initial launch of Spyder 4.

Type in:

bash -c "$(wget -q -O -"

Then press [↵]:

Then press [↵] to proceed:

Kite is now installed:

Anaconda Navigator – High DPI and Zoom Problem

The Anaconda Navigator has a setting "Enable High DPI Scaling" which is supposed to scale it properly on a High DPI screen. Unfortunately it does not work well on high DPI screens which use a zoom of 150 %-200 % such as newer Dell XPS models and the tiles may be too large with only a fraction of the Anaconda Navigator displaying.

To resolve this, select File and Preferences:

Look for "Enable high DPI scaling" and uncheck it:

On my XPS 13, the Preferences Window did not display properly and I could not access the checkbox or the Apply button. Press [Alt] + [F4] to close down the Anaconda Navigator.

This setting can be change manually by pasting in the following into the Windows Explorer Address Bar:


This will take you to the anaconda navigator configuration file which is anaconda-navigator.ini.

Right click anaconda-navigator and select Edit.

Here you will be able to change enable_high_DPI_scaling from True to False.

Once this is done, the Anaconda Navigator should display as normal.


JupyterLab is another IDE which is browser based.

File Explorer

Select the folder you want on the left left hand side menu. In this case Documents. Compatible files can be opened using this left hand side menu.

To the right hand side a Launcher is opened as a tab to the right hand side. From the launched we can create a new Text File, Markdown File or new Notebook.

Text File

From the launcher select Text File:

A new text file called untitled.txt will be opened. Note that this is automatically saved to the Documents folder which is the directory opened to the left hand side:

The file can be renamed by right clicking the tab or the file name within the File Explorer and selecting rename:

In this case I will rename it TestText.txt:

The file is renamed. A new tab can be created by opening another file or adding an additional launcher:

Markdown File

Let's have a look at a MarkDown File. This is essentially a Report File. It acts like a Text File but the Text can be formatted.

Select Markdown File:

Then right click an empty space in the file and select Show Markdown Preview:

# Heading 1
Example Text.
## Heading 2 Bold and Italic
Example Text in **bold**, *italic* and ***bold-italic***.
Strike through ~~this~~.
### Heading 3 List
* Apples
* Bananas
* Grapes

1. Apples
2. Bananas
3. Grapes

* Apples

* Bananas

* Grapes

# Special Characters





# Mathematics
To use an inline equation enclose in \*(equation)\*.

Example Text with inline equation $f\left(x\right)$

To use a display equation enclose in \*\*(equation)\*\*.

Display Equation
$$f\left(x\right)=a_0+\sum_{n=1}^{\infty}\left(a_n\cos{\frac{n\pi x}{L}}+b_n\sin{\frac{n\pi x}{L}}\right)$$

# Link

# Code
This code will
print('Hello World')
print the string 'Hello World'
# Horizontal Separator

The file name can be renamed by right clicking the tab and selecting rename:

Then inputting the desired name and then selecting Rename:

The file is now renamed:

Image files can also be added to the Markdown File. The image should be stored in the same folder as the MarkDown File:


The text within the square brackets is an optional title and can be left blank.

A table can also be generated using the following syntax:

| A | B | C | D |
| -: | :- | :-: | --- |
| apple | banana | carrot | dragon fruit |
| avocado | blueberry | cucumber | dew berry |
| apricot | blackberry | clementine | |

The 0th row is the heading names.

The 1st row is the alignment options (align right, left, center and left with a center heading).

NoteBook File

A NoteBook file consists of a series of cells that can be MarkDown, Code or Raw (Text). Open a new Launcher and select a new Python 3 Notebook:

The currently selected cell is highlighted in Blue to the left hand side. In this case I will set the cell to a MarkDown cell and create a Heading:

Then Run:

When I run this the cell displays as a heading (it can be edited again by double clicking it).

A new cell is created, this time I will leave it as Code. The Code can be ran:

When the code is ran a number displays denoting the order the cells were ran in. This is important when cells are dependent on earlier cells. For example if we create other cells:

The Code cells can be ran in any order i.e. it doesn't need to be ran from top to bottom however if the code of one cell requires the code to run in another cell before hand for example in the case of variable assignment errors will display:

If the assignment code cell is ran before the display code cell, the code works:

Code in the cells can be modified and ran again.

In this case we are asking to display a lot of data. We can right click the left hand side bar of the cell which is highlighted blue and we can enable or disabling scrolling for the output cell:

We can create x and y data and test plotting using the same code as we used in Spyder 4. JupyterLab (without plugins) plots figures inline i.e. making them images:

The cell that creates the inline figure can be reran to update the figure however:

Typing a [↹] gives auto-complete options:

Typing [⇧]+[ ↹ ] will give the docstring which gives more details about the input arguments of a function:

Getting Started with Python Programming

More details about the JupyterLab IDE can be found in the interactive JupyterLab Notebook files on GitHub:


Close and open any terminal windows.

To launch Anaconda navigator type in:


You can then launch a variety of IDEs such as Spyder or JuypterLab:

Launch Spyder 4 from the Anaconda Navigator:

Spyder 4 should launch:

Spyder can be launched directly from the terminal by typing in:


High DPI Settings and Spyder Light Theme

Select Tools and then Preferences:

If you have a high resolution screen. Select General and Enable auto high DPI scaling.

Select Appearance. Under Syntax Highlighting Theme change Spyder Dark to Spyder:

Select Apply:

Select yes to restart Spyder

Running a Script for the First Time and Accessing Variables from within the Console

Let's create a variable:


We can then select the run button:

At first launch, you will be given the run settings. If you want to access variables from the console in a script. Check "Run in console's namespace instead of an empty one", this was enabled by default in Spyder 3 and is disabled by default in Spyder 4 causing some confusion.

If you don't have this setting enabled the script won't be able to access variables created from earlier scripts or from the console. Here a is present in the variable explorer but the script cannot find it:

These settings can also be accessed by selecting Tools then Preferences:

The run tab shows the settings above:

Note the settings will apply only for newly created scripts not existing scripts, so attempt this with a new script.

Plot Settings

We can put together a very basic test script to create a plot:

import numpy as np
import matplotlib.pyplot as plt

By default plots will display inline within the plots pane.

The backend can be changed to automatic in order to plot a graph in its own dedicated window by typing the following in the console:

%matplotlib auto

It can also be reverted to inline using:

%matplotlib inline

This change will be made only for the current session and will revert to a default setting once the kernal has been restarted. To change the default setting, go to Tools and Preferences:

To the left hand side, select IPython console. Select the graphics tab. Change the backline to either automatic or inline:

Select Apply:

Getting Started with Python

These are guides I wrote when first learning Python coming from a MATLAB background. The guides written using the JupyterLab IDE are a better quality as I had an additional year of Python experience.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.