Page 1 of 1

Building uPyCraft with Visual Studio 2017 Community Edition

Unread postPosted:Sun Mar 24, 2019 4:21 pm
by barbudor
Hello

I am running VSTudio 2017 on a Win7 64-bit laptop.
I have a few problems for which I am seeking advices:

Installing SIP
Code: Select all
 unpack the directory and open
 exec:
     python configure.py
 
 enter Visual Studio command prompt, changedir to sip installed path
     nmake
     nmake install
On the 1st nmake, I have the following errors:
Code: Select all
        cd siplib
        "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\
MSVC\14.16.27023\bin\HostX86\x86\nmake.exe"

Microsoft (R) Program Maintenance Utility Version 14.16.27027.1
Copyright (C) Microsoft Corporation. Tous droits réservés.

        link /NOLOGO /DYNAMICBASE /NXCOMPAT /DLL /MANIFEST /MANIFESTFILE:sip.pyd.manifest /SUBSYSTEM:CONSOLE /INCREMENTAL:NO /OUT:sip.pyd @C:\Users\BARBUDOR\App Data\Local\Temp\nmB8D7.tmp
python36.lib(python36.dll) : fatal error LNK1112: computer type module 'x64'  conflict with the target computer type 'x86'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017
\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\link.EXE"' : code retour '0
x458'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017
\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\nmake.exe"' : code retour '
0x2'
Stop.
Also I downloaded PyQt4-4.11.4-gpl-Py3.4-Qt5.5.0-x64.exe but at installs it complains that it is build for Python 3.4 while VStudio includes Python 3.6.
Indeed if I run uPyCraft.py it fails as below
Code: Select all
>python uPyCraft.py
Traceback (most recent call last):
  File "uPyCraft.py", line 2, in <module>
    from PyQt4.QtGui  import *
ModuleNotFoundError: No module named 'PyQt4'
Has anyone got any advice to share ?

Thanks

Re: Building uPyCraft with Visual Studio 2017 Community Edition

Unread postPosted:Tue Mar 26, 2019 5:29 am
by nana.wang
ModuleNotFoundError: No module named 'PyQt4'
Try import the module before running the program.