Spyder is the best Python 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 favorite 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 Python 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!
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.
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 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 16.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 of Spyder and another Python IDE, Rodeo. As can bee seen on the image below, Rodeo look almost identical to RStudio.
Rodeo is a more minimalistic Python IDE compared to Spyder. Thus, there are fewer features. However, being a Python IDE in Rodeo 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.
Spyder is a great IDE indeed! However, 4 of 5 people who had previously been using Spyder decided to stick with PyCharm after I introduced them to that IDE. It is extremely powerful (and therefore has a somewhat steep learning curve at the beginning), and even supports remote debugging, which is essential e.g. in multi-processing apps (such as when debugging an experimental script for PsychoPy that uses ioHub for device polling). Check out https://www.jetbrains.com/pycharm, and be sure to get the Professional edition, for which you can acquire a free license for academic use.
As to how to use the remote debugger, I compiled a small tutorial a while ago:
https://github.com/hoechenberger/iohub-debug-pycharm
Cool. Gonna check it out.
By the way, saw on your CV that you’ve been attending/presenting at International Multisensory Research Forum. Are you going to China this year also? I am going to present a (pilot) study.
Yep, I’ll be there! Would be great to meet you! I signed up for a poster presentation of some visual-olfactory RT data 🙂
I really enjoy Spyder. A feature I wish existed is to be able to edit variables directly in the variable explorer. The end goal I think of is to have a spreadsheet interface to define input variables. The limitation of doing this in code comes about when you want to define a number of scenarios for each input (like a table where rows are inputs and columns are scenarios for each input). One could do that with a dictionary of lists but this is not the best for reading and editing safely. You can also use excel but then you have a disconnect with Spyder, and you don’t have highlighting of each input (to see where it is used in the code). Have you ever found this to be an issue?
Hey, Kieran.
Thanks for your comment. No, I have not found that being an issue. When I need to change a variable I use the iPython or Python interpreter. I have not worked with any IDEs that offers changing variables through the interface.
I agree that Spyder is the best Python IDE for scientific use. I would also argue that Spyder is the best Python IDE for programming, period? Why is Spyder the best IDE? Well, I think you are straight on point; the variable explorer is so great. When testing your Python scripts its invaluable to be able to check whats in your different variables. And for MATLAB users looking for a better, free, AND open source alternative to MATLAB, Spyder is the best. It’s quite similar to the MATLAB environment. And for the R stats users? Yes, Rodeo looks like RStudio (it’s a clone, right!) but I think there are more power in Spyder (best Python IDE for R users? ;-)).
There are two features that are missing from spyder and made me move to pycharm (at least for now):
1) No version control support. After I got used to the github integration of rStudio I can’t live without it
2) abysmal support for custom keybindings. Using editor without emacs keybindings is just painful.
btw, your research interests look very interesting 🙂
Hey Ilkka.
1) You are right, if you prefer to work with git within the IDE, PyCharm may be a better choice. Especially if you are used to this workflow within RStudio. However, after a while I started to use git in the terminal (mainly because branching was easier this way) so for me it’s not really a problem.
2) I don’t really have an opinion regarding this. You’re probably right. 😉
I am actually writing up a blog post (will probably publish it this weekend) in which I compare Spyder and PyCharm. This because I actually moved to using PyCharm when coding applications (and Jupyter Notebooks for data visualization and analysis).
Had a look at your Google Scholar profile. You’re involved in some interesting stuff. What are your main research interests?
Terminal is probably the best way to use git, however, I’m currently working on windows and the windows command prompt is what it is…
Very interesting to see your comparison on Spyder/PyCharm, I’m kind of new to python programming and am still sampling the different options (thats how I ended up in this page).
My main research interests are related to physiological computing: using physiological signals such as heart rate, skin conductance and “brainwaves” in (usually) real time to adapt computer applications in one way or another.
Even after a year using Spider, I don’t like it. Compared with Matlab’s GUI it feels soft and uncertain. Especially the lack of integration of the debugger costs tons of wasted hours compared to Matlab’s debugger. I’m still looking for something more stable and rocksolid, but haven’t succeeded yet. I think of picking up Eclipse, but had to drop it in the past because of it’s mere complexity. I guess that some crowd funding it necessary to make spider really stand out.
Hey Theo,
I like Spyder (as you may understand from the post ;-)). Then again, I did not like MATLAB that much at all. Maybe I did not really get to know the interface of MATLAB well enough to think that Spyder is much worse. I have tried to use Eclipse but the learning curve was to steep for me (at least at that time). It is supposed to be really powerful once you get to know it, I’ve heard.
Thanks for your comment. I hope you find a better IDE, comparable to MATLAB, because Python is a great programming language!
Hey, I just started python (don’t have any mention worthy programming expereience before)
and in our course we started to use Jupyter Lab (which feels great apart from beeing buggy and sometimes not doing anything even tho the programm is not too complicated. –> so i guess it is unsuable for complex tasks?)
Today I wannted to run my first programm on spyder py3.7 (it is the IDE installed on the Pc’s in the uni library)
. and it iskinda annoying.
I just want to run a 3 line for loop and it is way less intuitive than jupyter lab.
it took me like 30 min to figure out basic functions.
Mybe it is good for experienced users but not the best for beginners.
Hey Tristan. Thank you for your comment. Maybe you’re right. I was quite comfortable using Python before I started using an IDE. Right now, I am mainly using Jupyter Notebooks, to be honest.
Best,
Erik
I spent one day to learn PyCharm, I think I know most of them – all most true as I still need to browse its guide – for example the annoy Python indent – user need to click editor setting to keep it.
Many years ago I tried Eclipse too complicated, I used to use SourceInsight, SlickEdit, Visual studio. Tried a bit on VS code high expectation, yet updated too often with bugs, tried Anaconda – too heavy.
Basically I want a tool, not to play with tool – keep to learn or try to fix bug.
Spyder is nice to have variable explorer, it would be to be global. Pycharm will show context var besides source line, also in watch area and you can click … to expand a list.
Unfortunately, Sypder doesn’t know how to run pySimpleGUI code but pycharm does. so how can it be the best?