Installing the Anaconda Python Distribution with Spyder on Windows 10

Tutorial Video

The video and screenshots are for Anaconda 2020-02. Installation instructions are identical for 2020-07 and 2020-11.

Introduction

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.

It can be installed on Windows using the basic installer.

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

Uninstalling any old Anaconda Builds

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.

If you've got any previous versions of Anaconda you should first uninstall these before installing the latest standalone installer Anaconda. To do this right click the start button and select Apps and Features:

Check for Anaconda and uninstall it:

Select next to proceed with the uninstall:

Select next again:

Select Finish:

The uninstall will remove the Anaconda installation however Anaconda navigator and Spyder configuration files will be left behind. Sometimes if these configurations are corrupted it can cause an issue when Anaconda is reinstalled. To get around this we need to purge the system of the configuration files. To do this we need to view hidden files and manually delete them.

Go to:

C:\Users

Select your user name and delete any folders and files beginning with a full stop.

This should give you a clean uninstallation:

Any old versions of Kite should also be uninstalled.

Windows 10 Local User Account

The Anaconda Installation does not like User Accounts which contain spaces. This is not a problem if you have installed Windows 10 using a Microsoft Account as emails addresses cannot contain spaces.

On the other hand if Windows 10 is installed with a Local User Account it is possible to create a Local User Account with a space for example "Philip Yip". The Anaconda installation won't like this as there is a possibility that many third party Python libraries will not function due to the space. The user account "Philip" is preferable to the full name "Philip Yip".

Downloading and Installing Anaconda

You can download the latest Anaconda Windows 10 application from here:

Downloading and installing Kite manually usually saves time when first launching Spyder. Double click the installer and follow on screen instructions:

Select Next:

Accept the License Agreement:

It is recommended to select "Just Me":

It is recommended to use your default destination folder:

On the next screen it is recommended to leave the defaults.

Advanced: Only add Anaconda to your PATH environment variable if you want the ability to start Python from the command line.

Select Next:

Select Next:

Select Finish:

Install Kite

Launch Anaconda Navigator

Go to your Start Menu and locate the Anaconda folder. Select Anaconda Navigator:

Opt whether or not to send user feedback:

You will get details about the installed versions of software. Select Spyder and select launch:

Spyder Update

You will be informed of a Spyder Update after first launch. You should consider whether or not you want stability or the latest features.

If you want stability do not change the default Anaconda installation of the standalone installer. It is more stable and has had through testing.

If you want the latest Spyder version you should update your Anaconda installation, see below.

Installing Kite

When Spyder 4.x.x is first launched, you will be prompted to install Kite. Select Install Kite:

Kite will download. Once downloaded the install should begin, starting with a user account control prompt. This user account control prompt may be minimised, if so select it from the taskbar:

Select the user account control prompt:

The install will proceed:

Kite should now be installed. You can minimise the Kite window.

Updating your Anaconda Installation (Optional)

The standalone installer is usually the most stable version of Anaconda. In most cases it is recommended to only update when a new standalone installer is released unless you are looking for a bleeding edge feature or require a bug fix.

Notes are given below on optionally updating via the Anaconda Powershell Prompt.

To update the Anaconda distribution launch the Anaconda Powershell Prompt from your Start Menu.

Type in the following command:

conda update anaconda

You can also use:

conda update --all

Or to install a specific version of Spyder:

conda install spyder=4.1.1

You will get a list of the currently installed packages and the versions they will be updated to:

Press:

y

to proceed.

Anaconda will update. It is finished when you see (base) PS C:\Users\…>

Relaunching Anaconda Navigator will display the updated versions:

Dependencies Check

It is recommended to check whether all Dependencies are installed. To do this select Help and then Dependencies:

They should all be ticked.

Enabling the High DPI Setting and the Spyder Light Theme

Select Tools and then Preferences:

To the left hand side select the General Tab. If you have a high resolution screen select "Enable High Auto DPI Scaling":

To the left hand side select the Appearance Tab. Under Syntax highlighting thing change Spyder Dark to Spyder:

Select Apply and then OK:

Select yes to restart Spyder:

Spyder should restart with the high DPI setting and the Spyder light theme.

Run Settings

We can type:

a=1

In the console to assign the value 1 to a variable 1 which will display in the variable explorer.

We can then create a basic script:

print(a)

When we press the run button to run the script:

We will get the following run options:

By default "Run in console's namespace instead of an empty one" is unchecked unlike older Spyder versions. If we just select Run without checking this we get an error.

If this option is enabled the script runs as expected:

This option can be accessed by going to Tools and then preferences:

Then selecting Run to the left hand side and "Run in console's namespace instead of an empty one" on the right hand side.

Plot Settings

We can create a very basic script to test out the numpy library and the matplotlib plotting libraries.

import numpy as np
import matplotlib.pyplot as plt
x=np.arange(start=0,stop=11,step=1)
y=np.arange(start=0,stop=22,step=2)
plt.figure()
plt.clf()
plt.plot(x,y)
plt.show()

By default plots will show up inline embedded within the plots pane.

This behaviour can be modified for a single session to plot each figure in a dedicated window by typing in:

%matplotlib auto

in the console.

It can be reverted by typing in:

%matplotlib inline

The default behavior can be changed by going to tools and preferences:

To the left hand side selecting iPython Console, then to the top select Graphics. Change the backend to either automatic or inline as desired:

How to Use Spyder 4

I have created a Getting Started with Spyder 4 guide focusing on Core Python fundamentals.

And additional details on the Numeric Python (numpy) library and the matplotlib plotting library which are the most commonly used Python libraries in Data Science.

Leave a Reply

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