You are not logged in.

#1 2015-01-29 05:00:42

nbd
Member
Registered: 2014-08-04
Posts: 389

[SOLVED] PyDev in Eclipse doesn't see compiled modules for imports

The Python IDE plugin for Eclipse 'PyDev' on my machine doesn't see some modules as imports and sees others from one and the same directory: /usr/lib/python3.4/lib-dynload:

import readline # <-- 'Unresolved import' error mark here
import select   # <-- 'Unresolved import' error mark here
import termios  # <-- 'Unresolved import' error mark here
import audioop  # <-- No error mark.
import parser   # <-- No error mark.

All these modules are residing in one directory and import within python interpreter without problems. Moreover, those modules which are marked with 'Unresolved import' error - run without problems within PyDev itself (error marks are just red text editor embellishments, dynamically shown in the editor during the "coding time").

Can the fact that all modules in that directory are compiled modules tell something about possible cause of this problem? For example, the compiled module 'select' gives an error when imported, but a source module 'selectors' which provides interface to the 'select' module is imported OK.

I know about#@ UnresolvedImport workaround, which simply ignores the error, but what can cause this problem?

EDIT: This problem looks like a PyDev bug. The solution to it which seems to be assumed by PyDev design is to add every problem module to the list of 'forced builtins' in the PyDev configuration.

Last edited by nbd (2015-01-29 07:36:51)


bing different

Offline

Board footer

Powered by FluxBB