3

I want to install PyQt. This seems kind of complicated to install on OS X. I haven't found any precompiled packages of it (are there any? I would really prefer those).

So I downloaded PyQt. And SIP, because it depends on that. These files:

Did a python configure.py && make && sudo make install on SIP -- installed without any problems.

Tried the same on PyQt -- and failed of course:

/Library/Frameworks/QtCore.framework/Headers/qglobal.h:288:2: error: #error "You are building a 64-bit application, but using a 32-bit version of Qt. Check your build configuration."

Ok, so I tried with python configure.py --use-arch=i386. Same error.

Any idea?

Chealion
  • 25,408
  • 8
  • 67
  • 75
Albert
  • 6,531
  • 11
  • 39
  • 51

4 Answers4

1

A new version of Qt, esp. Qt 4.7 Beta, seems to fix this problem.

http://qt.nokia.com/developer/qt-qtcreator-prerelease

Albert
  • 6,531
  • 11
  • 39
  • 51
1

You can also use MacPorts to install pyqt, qt, and many other packages. I haven't used the pyat package, but in general I've been pleased with MacPorts. It also makes it easy to update various packages as bew versions come out.

KeithB
  • 9,976
  • 2
  • 23
  • 17
  • I have made bad experiences with MacPorts in the past, that is why I am trying to avoid it. I also want to use PyQt with my system Python and not with any Python installed by MacPorts (not sure if MacPorts is handling that correctly). – Albert Jul 07 '10 at 18:20
  • On the contrary, I'm not sure that system Python is being handled correctly and instead trust the MacPorts Python install. Another vote here for MacPorts and the `py26-pyqt4` port. – fideli Jul 09 '10 at 22:20
1

It worked without problems via Homebrew:

brew install pyqt

Note that there was also PySide. Although that seems like it is abandoned and does not support Qt 5. You probably can install it anyway via:

brew install pyside
Glorfindel
  • 4,089
  • 8
  • 24
  • 37
Albert
  • 6,531
  • 11
  • 39
  • 51
0

You're better off using PyQtX which is binary precompiled package of PyQt for OS X. Compiling it manually is a big hassle.

AbiusX
  • 126
  • 4