Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Persuading pydev to find PyQt

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
User avatar
neddie
Posts: 380
Joined: 2009-09-14 07:57

Persuading pydev to find PyQt

#1 Post by neddie »

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
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Persuading pydev to find PyQt

#2 Post by stevepusser »

Was pydev installed from the Debian repositories, as in "python3-dev"?
MX Linux packager and developer

User avatar
neddie
Posts: 380
Joined: 2009-09-14 07:57

Re: Persuading pydev to find PyQt

#3 Post by neddie »

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.

Post Reply