Python Forum

Full Version: PyQt4 installation frustration
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to get PyQt4 setup, so I can run the converter that will take the XML created by QT designer and translate it to Python code to work with the python that is included with 3ds Max.

My first question is, why isn't there some place where I can download the pyuic4.exe and just use that, why do they force us to go through this convoluted make/build process?

Where I'm at:

Because of 3ds Max, I'm working with older versions; Python 2.7.12, Qt 4.8.7, and PyQt 4.12.3

After a few false starts, I found this helpful link: https://cbuelter.wordpress.com/2015/02/1...-max-2015/

I've installed the Sip and verified

I installed Qt 4.8.7 (build took in excess of 4 hours)

and then on to the PyQt step. Downloaded the windows version, PyQt4_gpl_win-4.12.3

After resolving several issues, with respect to the path to nmake, etc. I'm no getting the following error:

C:\PyQt4_gpl_win-4.12.3>python configure-ng.py --verbose
Querying qmake about your Qt installation...
Determining the details of your Qt installation...
C:\Qt\4.8.7\bin\qmake.exe -spec win32-msvc2008 -o qtdetail.mk qtdetail.pro
nmake -f qtdetail.mk release

Microsoft ® Program Maintenance Utility Version 11.00.50727.1
Copyright © Microsoft Corporation. All rights reserved.

"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\nmake.exe" -f qtdetail.mk.Release

Microsoft ® Program Maintenance Utility Version 11.00.50727.1
Copyright © Microsoft Corporation. All rights reserved.

cl -c -nologo -Zm200 -Zc:wchar_t- -O2 -MD -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DNDEBUG -I"..\Qt\4.8.7\include\QtCore" -I"..\Qt\4.8.7\include" -I"..\Qt\4.8.7\include\ActiveQt" -I"release" -I"..\Qt\4.8.7\mkspecs\win32-msvc2008" -Forelease\ @C:\Users\selms\AppData\Local\Temp\nm828C.tmp
qtdetail.cpp
link /LIBPATH:"c:\Qt\4.8.7\lib" /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /MANIFEST /MANIFESTFILE:"release\qtdetail.intermediate.manifest" /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /OUT:release\qtdetail.exe @C:\Users\selms\AppData\Local\Temp\nm8404.tmp
QtCore4.lib(QtCore4.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\link.EXE"' : return code '0x458'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
Is there any reason why you wouldn't use PyQt5?
I just tried install in virtual environment using pip and it worked fine.
then you can just use pip:
pip install PyQt5
apparently same not available for PyQt4
Thank you for the response. There may not be a reason to avoid PyQt5. I just had a concern that PyQt5 should be used in conjunction with Python 3+

You did however point me in a different direction that allowed me to find this:

https://stackoverflow.com/questions/2264...-using-pip

which lead to this:

https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyqt4

which in turn allowed me to pip install using the wheel. Not the exact version I was looking for, but close enough. I've been able to successfully use the pyuic4.bat now to generate python from the Qt ui file.
Quote: I just had a concern that PyQt5 should be used in conjunction with Python 3+
Is there a reason why not to use python 3?
2.7 support is about to die.
The version bundled with 3ds Max is 2.7