Why Spyder is the Best Python IDE for Science

This post was originally published here

Spyder is the best IDE that I have tested so far for doing data analysis, but also for plain programming. In this post I will start to briefly describe the IDE. Following the description of this top IDE the text will continue with a discussion of my favourite features. You will also find out how to install Spyder on Ubuntu 14.04 and at the end of the post you will find a comparison of Rodeo (a newer IDE more RStudio like) and Spyder.

When I started programming in Python I used IDLE which is the IDE that you will get with your installation of Python (e.g., on Windows computers). I actually used IDLE IDE for some time. It was not until I started to learn R and found  RStudio IDE. I thought that RStudio was great (and it still is!). However, after learning R and RStudio I started to look for a better Python IDE.

There are, of course, other IDEs. Personally, I used Ninja-IDE for a while but I quite quickly found Spyder IDE better. Spyder is an acronym for  “Scientific PYthon Development EnviRonment”. The IDE create a MATLAB-like development environment but, as previously mentioned, it is also quite similar to RStudio. Great, for people with experience of both RStudio and MATLAB!

Spyder - best Python IDE
Spyder GUI including the object inspector

In fact, Python with the right IDE may be a free open source alternative to MATLAB (e.g., Spyder). Last time I used Matlab was 2011 and I don’t have a working installation on any computer. Moreover, a Spyder (Python) vs. MATLAB comparison is out of the scope for this post.

Why do I think Spyder is the best IDE for Python?

Well, I really like working with RStudio. One of my favourite features of RStudio is that it easy to find help for a package or a function (i.e., type “help(function)”in the console). Spyder has the “Object inspector” (see image below) in which you can search for documentation for a class, function or module.

Spyder IDE Object inspector
Object Inspector

Another feature in the GUI I really like is the “Variable explorer” (again similar to RStudio; you can see your variables (Data and values) in the Environment).  When using Spyder  your code can also be analysed using Pylint or Pyflakes.

Spyder Python IDE Variable explorer
Variable explorer

Spyder also got many other great features and here are some of them:

  • syntax coloring for Python, C/C++, and Fortran
  • breakpoints and conditional breakpoints
  • run or debug Python scripts
  • iPython and Python consoles

These were some of the qualities that makes me think that the Spyder is the best Python IDE. Obviously, the IDE many other good qualities. Below is a short video showing these properties.

How to install Spyder

On Ubuntu 14.04 Spyder can be installed by using pip or apt-get:

Pip

sudo pip install spyder

apt-get

sudo apt-get install spyder

Spyder vs. Rodeo

I will finish the post with a quick comparison between Spyder and Rodeo. As can bee seen on the image below, Rodeo look almost identical to RStudio.

Rodeo looks similar to RStudio
RStudio and Rodeo interfaces

Rodeo is way more minimalistic than Spyder. Thus, there are fewer features. However, being a  Python IDE you can type help(“imported module”) to see information of a module (i.e., Object inspector in Spyder). If you are looking for a slimmed Python IDE Rodeo may be the one for you (all features of Spyder may not be useful to you). However, if you want more features and Spyder is the best python IDE.

The post Why Spyder is the Best Python IDE for Science appeared first on Erik Marsja.

Related Posts

Leaving HPE For the past two years I have been employed by Hewlett Packard Enterprise to work on the various tools, libraries, and frameworks that make up the ope...
Unix locales vs Unicode (‘ascii’ codec can’t encode character…) You might get unusual errors about Unicode and inability to convert to ASCII. Programs might just crash at random. Those are often simple to fix &mdas...
Structuring and automating a Python project with the Python Project Template To create a project that other people can use and contribute to, you need to follow a specific directory structure. Moreover, releasing a new version ...
April Fools’ Day Python Prank “With great power comes great responsibility.  Except on April Fools’ Day.”         &em...