Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyDev doesn't autocomplete for some modules (numpy, matplotlib at least)

Tags:

python

pydev

This is similar, but not this question Code-Completion for e.g. Numpy, SciPy or Matplotlib does not work in Eclipse PyDev

My problem isn't that PyDev can't resolve the variables as their specific type, I can't even get it to look into the numpy module for the functions. For example

import numpy as np
np.<ctrl+space>

gives me nothing. These modules are in my list of forced builtins.

Autocomplete does work for many other modules (including Qt/qwt, serial, struct) and the programs run fine. However, every time I use np.something eclipse thinks it is an error(red line under it). Does this "just work" for everyone else?

Edit (additional info):

There are errors in my error log. However, they are about Java not having permissions to run pylint and complaints about invalid encoding. I am running Eclipse 3.8.1 with python 2.7 on Ubuntu 13.04. Historically, I develop python in Spyder, so whatever I am missing likely has to do with Elipse nuances.

like image 573
Matt Avatar asked Aug 23 '13 15:08

Matt


1 Answers

It should 'just work' for you. Can you check if 'numpy' is on the 'forced builtins' list (in your interpreter configuration -- it should be added automatically, but it's possible it's not there. See: http://pydev.org/manual_101_interpreter.html for details on it).

If it is and you still have an issue, please check if you have some error in your error log -- see: http://pydev.org/faq.html#PyDevFAQ-HowdoIReportaBUG%3F for details on getting it.

like image 69
Fabio Zadrozny Avatar answered Nov 15 '22 06:11

Fabio Zadrozny