Spyder does not autocomplete local variables

idoda picture idoda · Aug 4, 2013 · Viewed 67.8k times · Source

I'm having a problem getting my local variables autocompleted. This is a very basic functionality which I'm sure it should support. When I'm starting to write a variable name which was already declared, and press TAB (this is the default shortcut), I get nothing. Is this a bug?

Answer

Carlos Cordoba picture Carlos Cordoba · Aug 5, 2013

(Spyder dev here) Spyder does complete local variables but to have this functionality you need to install a library called rope. You can do it by running this command in a terminal

pip install rope

If you use Python 3 this command needs to be

pip install rope_py3k

Besides, code completion on the Editor works now with both Ctrl+Space and with Tab.

Edit: Updated answer for the Spyder version 2.3.0.