[PyQt] ImportError

FiFo fifothekid at gmail.com
Wed Sep 19 14:48:32 BST 2018


so here is what I did to get it to work:
1- I completely deleted my Qt5 build directory, and went to the local
repository and cleaned it with:
nmake clean
nmake distclean
2- Configured with
configure -nomake examples -nomake tests -skip qtwebengine -opensource
-developer-build
Then built with
jom
Without doing nmake install
After that I pointed all the environmental variables to the build directory
3- Removed both of sip and PyQt5 and downloaded the latest snapshots
4- Configured and built SIP with:
python configure.py --sip-module PyQt5.sip
nmake
nmake install
5- Configured and installed PyQt5 with shared libraries using the commands:
python configure.py --qmake D:\opencv\qt5\qtbase\bin\qmake.exe --sip-incdir
..\sip-4.19.13.dev1809181320\siplib --sip
d:\opencv\sip-4.19.13.dev1809181320\sipgen\sip.exe --confirm-license
--disable QtNfc
nmake
nmake install

Note that I followed an advice that I found on many websites recommending
disabling QtNfc. It looks like it is causing compilation errors to
everybody, something about duplicate symbols.

Now that I got everything working I hope that you can find solutions for
two problems:
1- Static building on Windows
2- QtNfc build errors

Thanks a lot!

On Tue, Sep 18, 2018 at 6:21 PM Florian Bruhin <me at the-compiler.org> wrote:

> On Tue, Sep 18, 2018 at 06:19:35PM -0300, FiFo wrote:
> > Do you think that building as a shared library would solve the
> > problem?
>
> I have no clue - but if you don't have a reason you need a static build,
> I probably wouldn't do one ;-) They tend to be more painful than shared
> libraries in general from what I've seen.
>
> Florian
>
> --
> https://www.qutebrowser.org | me at the-compiler.org (Mail/XMPP)
>    GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
>          I love long mails! | https://email.is-not-s.ms/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20180919/a76ce766/attachment.html>


More information about the PyQt mailing list