code completion – Spyder does not autocomplete local variables

code completion – Spyder does not autocomplete local variables

(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.

Another hint:

If you want to customize the shortcut (for example, your ctrl+space is already occupied), try

Tools--Preferences--Keyboard shortcuts--code completion

you can change it to whatever you want

code completion – Spyder does not autocomplete local variables

Idoda, I made a little guide to install Python for scientific computing on Ubuntu or Debian from their repositories. I tested correctly using Python 3 on Ubuntu 14.04 LTS.

It summarizes as follows. First, install the interpreter and the package manager:

sudo apt-get install python3 python3-pip 

Now install the Spyders IDE:

sudo apt-get install spyder3

Thanks to Carlos Cordobas advice, if you want to enjoy the autocomplete execute:

sudo pip3 install rope_py3k

Finally, open Spider and check if the autocomplete works rightly.

Leave a Reply

Your email address will not be published.