Table of contents
- Tutorial Video
- Uninstalling any old Anaconda Builds
- Windows 10 Local User Account
- Downloading and Installing Anaconda
- Launch Anaconda Navigator
- Spyder Update
- Installing Kite
- Updating your Anaconda Installation
- Dependencies Check
- Enabling the High DPI Setting and the Spyder Light Theme
- Run Settings
- Plot Settings
- How to Use Spyder 4
The issue highlighted in tutorial video about the kernal not working when Spyder 4.1.0 is launched from the start menu has been fixed in Spyder 4.1.3.
Uninstalling any old Anaconda Builds
If you've got any previous versions of Anaconda you should first uninstall these before installing the latest standalone installer Anaconda 2020-20. 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 your user name and delete any folders and files beginning with a full stop.
This should give you a clean uninstallation:
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:
Double click the installer and follow on screen instructions:
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.
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:
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.
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
Anaconda, Python, third party Python libraries and IDEs are continuously being updated. It is recommended to update to Spyder 4.1.1 which is stable.
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:
Anaconda will update. It is finished when you see (base) PS C:\Users\…>
Relaunching Anaconda Navigator will display the updated versions:
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.
We can type:
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:
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.
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:
in the console.
It can be reverted by typing in:
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.