djq
djq

Reputation: 15298

Problems installing PyQt4 on Lion (OSX)

I'm trying to install the python IDE eric4 on a mac with Lion. I have installed PyQt-mac-gpl-4.8.6, QT-1.1.4 and SIP-4.13. When I navigate to the folder where I downloaded eric4 and run the command sudo python install.py I get the following message:

Checking dependencies
Python Version: 2.7.1
Found PyQt4
Sorry, please install QtHelp.
Error: No module named QtHelp

How can I install the QtHelp module? I used the QT installer with the default options. When I went to reinstall it using the custom options, I could not see the help files listed anywhere.


EDIT:

In retrospect, I realize this has nothing to do with Eric, but rather my inability to install PyQT4. When I run the line:

python2.7 configure.py -w -g -q /Users/cel/QtSDK/Desktop/Qt/474/gcc/bin/qmake

I get the following output:

Checking to see if the QtHelp module should be built...
g++ -DQT_NO_DEBUG -I. -I/Users/cel/QtSDK/Desktop/Qt/474/gcc/mkspecs/default -I/Users/cel/QtSDK/Desktop/Qt/474/gcc/lib/QtHelp.framework/Headers -I/Users/cel/QtSDK/Desktop/Qt/474/gcc/include -pipe -O2 -w cfgtest_QtHelp.cpp -o cfgtest_QtHelp -F/Users/cel/QtSDK/Desktop/Qt/474/gcc/lib -L/Users/cel/QtSDK/Desktop/Qt/474/gcc/lib -headerpad_max_install_names -framework QtHelp
Undefined symbols for architecture x86_64:
  "QString::fromAscii_helper(char const*, int)", referenced from:
      _main in ccPUS9BG.o
  "QString::free(QString::Data*)", referenced from:
      _main in ccPUS9BG.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

Perhaps this is due to a problem compiling this version of PyQT4 on Lion?

Upvotes: 1

Views: 2735

Answers (2)

Yolan
Yolan

Reputation: 11

I found sth on mail list, and work fine for me:)

I had to patch the configure script with this line so the qthelp module loads the qtcore libraries when building.

--- PyQt-x11-gpl-4.9/configure.py~ 2011-12-23 14:53:07.981490550 +0100 +++ PyQt-x11-gpl-4.9/configure.py 2011-12-23 14:52:38.384984221 +0100 @@ -1264,7 +1264,7 @@ opengl = (mname == "QtOpenGL")

qt = [mname]

- if mname in ("QtOpenGL", "QtWebKit"): + if mname in ("QtHelp", "QtOpenGL", "QtWebKit"): qt.append("QtCore")

makefile = sipconfig.ProgramMakefile(sipcfg, console=1, qt=qt,
warnings=0,

Works fine for me.

Upvotes: 1

ekhumoro
ekhumoro

Reputation: 120768

Firstly, check whether the QtHelp module is, in fact, installed.

Run this command in a console to find the location of the PyQt4 package:

python2.7 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"

Look inside the resulting directory for any PyQt4/QtHelp.* files. If there's nothing there, run the configuration for PyQt4 again with the verbose flag:

$ make clean
$ python2.7 configure.py -w

This should give some error messages indicating why the configuration for the QtHelp module failed. This would most likely be because some required libraries or build tools are missing.

Upvotes: 1

Related Questions