Table of contents
- Installation Video
- Updating Anaconda
- Update Anaconda Navigator
- Launch Anaconda Navigator
- Launching Spyder and Installing Kite
- Check Dependencies
- Changing to the Spyder Light Theme
- Running a Script for the First Time and Accessing Variables from within the Console
- Plot Settings
- How to Use Spyder 4
Go to the Anaconda website:
Download the Linux 64 Bit installer.
Select Save File and then OK:
Open up a terminal and type in:
cd stands for change directory.
To install type in bash followed by a space and then the file name including .sh extension (note the installer may be updated so ensure the date matches that of the standalone installer):
Type in [Enter] multiple times to scroll through the license agreement. Then type in:
to accept the agreement and proceed with the install.
Type in [Enter] to proceed with the default location.
to run conda init.
Once done, close the terminal.
Open up a new terminal and type in:
conda update anaconda
to proceed with update Anaconda.
Wait for the update to proceed.
Update Anaconda Navigator
To update the Anaconda Navigator type in:
conda update anaconda-navigator
To proceed with the update.
Now that this is updated, the Anaconda installation and Anaconda navigator should work correctly on Linux Mint:
Launch Anaconda Navigator
To launch Anaconda navigator type in:
You can then launch Spyder:
Launching Spyder and Installing Kite
When Spyder is initially launched you will be prompted to install Kite. Select Install Now:
Wait for Kite to download and install:
You can close Kite when it is installed:
Before using Spyder, it is worthwhile to check its dependencies. Go to help and then Dependencies:
They should all be ticked:
Changing to the 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 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:
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:
We can put together a very basic test script to create a plot:
import numpy as np import matplotlib.pyplot as plt x=np.arange(start=0,stop=10,step=1) y=np.arange(start=0,stop=10,step=1) plt.figure() plt.clf() plt.plot(x,y) plt.show()
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:
It can also be reverted to inline using:
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:
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.