Python Forum
PyQt4 installation frustration
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PyQt4 installation frustration
#1
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.
Reply
#2
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
Reply
#3
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.
Reply
#4
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.
Reply
#5
The version bundled with 3ds Max is 2.7
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyQt] PyQt4 dynamic QComboBox littleGreenDude 4 5,605 Jan-02-2019, 07:22 PM
Last Post: littleGreenDude
  [PyQt] PyQt4 handle dynamic checkbox click littleGreenDude 1 6,539 Dec-27-2018, 09:17 PM
Last Post: littleGreenDude
  [PyQt4] Is it right python coding scheme between TCP Server Thread and GUI class ? KimTom 3 3,210 Sep-18-2018, 01:21 PM
Last Post: Alfalfa
  How to Integrate PyQt4 Custom Widget with Qt Designer Zukias 1 3,885 Aug-29-2018, 05:33 PM
Last Post: Zukias
  Updating Python version from command prompt and Conversion from PyQt4 to PyQt5 Vysero 4 4,888 Jul-19-2018, 03:15 PM
Last Post: Vysero
  Trouble displaying an image in PyQt4 Vysero 2 3,062 Jul-01-2018, 05:25 PM
Last Post: Alfalfa
  [PyQt] problem with PyQt4 jss15497 0 2,725 Jan-16-2018, 08:32 AM
Last Post: jss15497
  [PyQt] Learn pyqt5 using pyqt4 jimclay75051 5 5,705 Nov-13-2017, 06:29 AM
Last Post: zykbee
  How to program PyQt4 from python? medic_ward 3 4,859 Feb-27-2017, 05:11 PM
Last Post: medic_ward
  PyQT4 only upper case text iFunKtion 1 3,646 Feb-27-2017, 01:13 PM
Last Post: Raures

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020