Persuading pydev to find PyQt

Need help with C, C++, perl, python, etc?

Persuading pydev to find PyQt

Postby neddie » 2015-06-03 17:05

Background: I've got python3, and pyqt, and python3-pyqt4, and I can develop and run pyqt applications with no problem. I can just call "python3 filename.py" and python finds all the PyQt stuff automatically, so I'm sure I've got the python and qt things installed properly.

Now I want to start using eclipse, so I've got eclipse, and pydev installed fine. But pydev doesn't find the PyQt stuff, and shows red errors everywhere I try to import or use the PyQt classes. If I run my class, it runs just fine, so python3 is happy finding pyqt but pydev can't see it. Other libraries which I've installed can be found by pydev just fine and I get tooltip help and even see the source under /usr/lib/python3/dist-packages.

On the import statement (from PyQt4 import QtCore) it manages to find PyQt4/__init__.py but QtCore is flagged as an "unresolved import". It looks like QtCore is inside a .so which might be confusing pydev? I tried adding the PyQt4 folder as an External library in the project settings but that didn't make any difference. Is there another way I can tell pydev where to find the PyQt4 information so that it doesn't fill my screen with errors? Do I need to separately download the PyQt4 source from somewhere and point pydev at that?
User avatar
neddie
 
Posts: 380
Joined: 2009-09-14 07:57

Re: Persuading pydev to find PyQt

Postby stevepusser » 2015-06-03 18:17

Was pydev installed from the Debian repositories, as in "python3-dev"?
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Krita 3.3.2.1, Pale Moon 27.6.0, Audacity 2.2.0, mpv 0.27.0, Corebird 1.7.1, Firefox 57.0, SMPlayer 17.11.2
User avatar
stevepusser
 
Posts: 8900
Joined: 2009-10-06 05:53

Re: Persuading pydev to find PyQt

Postby neddie » 2015-06-05 06:14

I don't have the package "python3-dev" installed, this is apparently "Header files, a static library and development tools for building Python modules". Nothing to do with eclipse, nothing to do with pyqt, nothing to do with qt. I can try installing it and see if that makes any difference.

The "pydev" I was talking about is something else, it's an eclipse plugin for python. I installed it from within eclipse's software update function using pydev.org/updates.

The "python3-pyqt4" came from jessie's repositories, and I think the problem is that it contains .so files rather than python files. I also installed "python-qt4" as it's apparently the source package for python3-pyqt4.
User avatar
neddie
 
Posts: 380
Joined: 2009-09-14 07:57


Return to Programming

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable