Tutorial: Run Python With Spyder IDE

You might have read about applications like Python Tools for Visual Studio, PyCharm, and Spyder IDE. These are Integrated Development Environments (IDE).

As part of our complete guide on Python for SEO, we will learn how to use Spyder IDE to run Python.

This post is part of the complete Guide on Python for SEO

What is Spyder IDE

You can think of a Spyder IDE as an application, like Microsoft Word, that helps you write in Python instead of writing in text format.

Subscribe to my Newsletter

Note that if you have installed Python using Anaconda as we have seen earlier, Spyder IDE will be installed on your PC.

Understand The Spyder IDE Interface

Spyder IDE has three (3) main windows

  1. The Editor Window (for your scripts)
  2. The Object Inspector (for your files)
  3. The Console (for your IPython Shell)
Spyder IDE Interface

1. The Editor Window

The Editor Window is the place where you can write your Python scripts.

Python Scripts

2. The Object Inspector

The Object Inspector is where you can browse through your folders and information about modules, procedures, and functions that you are using in your script

3. The Console

The Console is where you can access your IPython Shell and see the results of your scripts.

Start a Project in Spyder

The first thing you need to do is to start a project.

Go to Project > New Project

Select the Path where you want to add your project.

This will become your work folder, where you will store and access files using Python.

Note: Make sure to use a local environment (your own PC, not a shared environment) if you plan to use command line. A server environment (ex: your company server folder or Google Drive) doesn’t allow you to work properly with command line.

Execute a Script in Spyder

To run a script in Spyder IDE, there are two options: use the command line option, use runfile in IPython.

Execute a Script Using the Command Line Options

Run > Configuration per file > Command line options


Hit Ctrl+F6

Run a Script Using Runfile

In [1]: runfile('C:/yourfolder/yourscript.py',args='one two three')

There are many other things you can do with Spyder IDE. Since most experts recommend Notebooks for beginner SEOs, I will not spend too much time on this.

Just work with the tool and you should be able to grasp the basics pretty quick.

3.3/5 - (6 votes)