[PyQt] pyqtdeploy, Windows and dynamically loading things

Robert Kent rob at gulon.co.uk
Fri Feb 5 20:27:05 GMT 2016


To continue my habit of answering my own questions...

Option 2) from below is the correct one and the reason _socket was 
failing to be imported was because I had neglected to pick up the 
necessary pyd files...

My application now compiles and just about limps along (*lots* of things 
I need to fix yet!).

Just want to add a huge thank you to Phil for all your tireless work on 
PyQt, sip, pyqtdeploy and all the other things you do.

Cheers, Rob

On 05/02/2016 18:28, Robert Kent wrote:
> Hi Phil,
>
> Having successfully got my application to build on MacOSX, I am now 
> attempting to do the same on Windows.
>
> Just for clarity, my setup is as follows:
>
> Windows 7
> MSVC 10.0
> Python 3.4.2
> Qt5.4
> PyQt5.4
> pyqtdeploy 1.2
>
> I have created a static build of all the required modules and have 
> successfully created a tiny test app that works. I have now got the 
> stage of attempting to include some .pyd files and am thoroughly 
> stuck. I have tried:
>
> 1) The method as detailed in the documentation of placing the pyd with 
> a qualified name in the same directory as the output exe and setting 
> the sys.path correctly. This runs however I get: ImportError: Don't 
> know how to import numpy.core.multiarray (type code 3). Thinking that 
> this might be the joys of Windows and static python/dynamic loading 
> issue I tested it using both importlib and imp and found that the 
> load_dynamic() method is indeed undefined.
>
> 2) I have now tried to configure my project to use the dynamic Python 
> as delivered by the MSI installer and have therefore set the project 
> to use platform python and pointed the include/lib fields at my native 
> install directories. This builds, but fails to run as it can't import 
> '_socket'. As this in one of the native c bits and should therefore (I 
> presume) be in the Python DLL I am left wondering what the hell I've 
> done wrong.
>
> I would really appreciate some guidance as to how to proceed now 
> either or a different path.
>
> Thanks very much indeed as always, Rob
>
>
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160205/0ba48566/attachment-0001.html>


More information about the PyQt mailing list