Spyder

Description

"Spyder is the Scientific PYthon Development EnviRonment: a powerful interactive development environment for the Python language with advanced editing, interactive testing, debugging and introspection features. "

Source: Spyder Website

Installed Versions

To know which versions of Spyder are installed in the HPC cluster use

module spider spyder

Output:

--------------------------------------------------------------------------------------------------------------

  spyder:

--------------------------------------------------------------------------------------------------------------

    Description:

      Spyder is the Scientific PYthon Development EnviRonment

     Versions:

        spyder/3.2.0-python2

--------------------------------------------------------------------------------------------------------------

  For detailed information about a specific "spyder" module (including how to load the modules) use the module's full name.

  For example:

     $ module spider spyder/3.2.0-python2

--------------------------------------------------------------------------------------------------------------

NOTE: we only had one version when we wrote this guide. Please run the commands to discover newer versions.

Loading the Module

In this example, we will try to load spyder/3.2.0-python2.

First, we need to make sure we are in the correct hierarchy. To know what modules need to be loaded in order to use Spyder, use

module spider spyder/3.2.0-python2

Output:

--------------------------------------------------------------------------------------------------------------

  spyder: spyder/3.2.0-python2

--------------------------------------------------------------------------------------------------------------

    Description:

      Spyder is the Scientific PYthon Development EnviRonment

    You will need to load all module(s) on any one of the lines below before the "spyder/3.2.0-python2" module is available to load.

      gcc/6.3.0  openmpi/2.0.1

      intel/17  openmpi/2.0.1

This tells us that we need to be either in the gcc/6.3.0 + openmpi/2.0.1 or the intel/17 + openmpi/2.0.1 hierarchy.

Just logging into the cluster use

module load spyder/3.2.0-python2 # This will load spyder for the Intel hierarchy

or

module swap intel gcc  # This changes to the GNU Hierarchy 

module load spyder/3.2.0-python2  # This will load spyder for the GNU hierarchy

One can also check the modules that have been loaded with

module list

Output:

Currently Loaded Modules:

  1) intel/17        4) python2/2.7.13      7) qt/4.8.7

  2) openmpi/2.0.1   5) base/8.0            8) gcc/6

  3) StdEnv          6) gstreamer/0.10.36   9) spyder/3.2.0-python2

We can observe that the module for Spyder already loads the required dependencies, including python/2.7.13.

Using Spyder

Since Spyder requires GUI, we recommend using one of the software in our visual access (for example, X2Go) to obtain the best performance. If connecting via OnDemand, skip the step below with srun. Otherwise once you are located on the head node with GUI, then request an interactive session on a compute node:

srun --x11 --pty /bin/bash

NOTE: If you plan to use Spyder to run Python scripts, you might want to allocate more memory and more CPUs than what is given by the default command above. We refer to the Interactive Job Session documentation if you need extra resources.

Then choose a hierarchy and load the Spyder module

module load spyder/3.2.0-python2

Prior to launching Spyder, ensure that the PYTHONPATH variable is set appropriately. For example, when using Spyder with Python2, that is:

export PYTHONPATH=/usr/local/gcc-6_3_0/openmpi-2_0_1/python2/2.7.13/lib/python2.7/site-packages

And we can execute Spyder with the following command:

spyder

You should obtain a window like the one in the picture.