Qbzr not working on Mac without PyQt4

Asked by Zearin on 2008-07-29

I'll let my Terminal explain for me. :)

Tonys-MacBook:~ tony$ bzr qbzr
bzr: ERROR: exceptions.ImportError: No module named PyQt4

Traceback (most recent call last):
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 846, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Library/Python/2.5/site-packages/bzrlib/plugins/qbzr/__init__.py", line 379, in run
    app = QtGui.QApplication(sys.argv)
  File "/Library/Python/2.5/site-packages/bzrlib/lazy_import.py", line 106, in __getattribute__
    obj = _replace()
  File "/Library/Python/2.5/site-packages/bzrlib/lazy_import.py", line 89, in _replace
    obj = factory(self, scope, name)
  File "/Library/Python/2.5/site-packages/bzrlib/lazy_import.py", line 192, in _import
    module = __import__(module_python_path, scope, scope, [member])
ImportError: No module named PyQt4

bzr 1.5 on python 2.5.1 (darwin)
arguments: ['/usr/local/bin/bzr', 'qbzr']
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /Library/Python/2.5/site-packages/bzrlib/plugins/bzrtools [1.5.0]
  launchpad /Library/Python/2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  qbzr /Library/Python/2.5/site-packages/bzrlib/plugins/qbzr [0.9.0]
  rebase /Library/Python/2.5/site-packages/bzrlib/plugins/rebase [0.3.0dev0]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

I'm running the latest version of Bzr on a Mac running OS X 10.5 "Leopard". Here is the output of "bzr version":

Tonys-MacBook:~ tony$ bzr version
Bazaar (bzr) 1.5
  Python interpreter: /System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python 2.5.1
  Python standard library: /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5
  bzrlib: /Library/Python/2.5/site-packages/bzrlib
  Bazaar configuration: /Users/tony/.bazaar
  Bazaar log file: /Users/tony/.bzr.log

Question information

Language:
English Edit question
Status:
Answered
For:
QBzr Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was originally filed as bug #253008.

Revision history for this message
Dan Watkins (oddbloke) said :
#1

Hi Tony,

On Tue, 29 Jul 2008 16:12:25 -0000
Zearin <email address hidden> wrote:
> Tonys-MacBook:~ tony$ bzr qbzr
> bzr: ERROR: exceptions.ImportError: No module named PyQt4
This suggests that you don't have the Python bindings for Qt 4
installed. If this is the case, then please install them and
everything should work as intended (let us know if it doesn't).

If they are already installed, then this will require the attention of
someone who knows more about Macs than I do. :)

 status Incomplete

Regards,
--
Daniel Watkins (Odd_Bloke)

Revision history for this message
Zearin (zearin) said :
#2

Where could I find out how to install the Python bindings for Qt 4?

Revision history for this message
Gary van der Merwe (garyvdm) said :
#3

Zearin wrote
> Where could I find out how to install the Python bindings for Qt 4?

http://www.riverbankcomputing.co.uk/software/pyqt/download

Revision history for this message
Lukáš Lalinský (luks) said :
#4

PyQt4 is also in MacPorts, which makes the installation much easier, but I have absolutely no idea how it plays the standard Mac python or which Python the bzr installer uses (I don't have and use a Mac).

Revision history for this message
Alexander Belchenko (bialix) said :
#5

In QBzr 0.9.1 or later you will get much nicer error message:

"QBzr require at least PyQt 4.1 and Qt 4.2 to run. Please check your install"

Your report not about bug in QBzr per se, so I'll close it.

Revision history for this message
Alexander Belchenko (bialix) said :
#6

QBzr require PyQt4 library. Where could I find out how to install the Python bindings for Qt 4 on Mac?

Revision history for this message
Zearin (zearin) said :
#7

Okay, so, I downloaded the latest version 4 of Qt. (I used Fink to do this. If you're unfamiliar with Fink, it's basically like apt-get but keeps track of Mac packages only.)

Then I attempted to run PyQT's configure.py (PyQT v4.4.2). I used the -q flag to provide the path to Qt's qmake. I got an error, which suggested that I use the --verbose flag to help debug.

Here is the result of that:


Tonys-MacBook:PyQt-mac-gpl-4.4.2 tony$ python configure.py --verbose -q /fink/lib/qt4-x11/bin/qmake
Determining the layout of your Qt installation...
/fink/lib/qt4-x11/bin/qmake -spec macx-g++ -o qtdirs.mk qtdirs.pro
make -f qtdirs.mk
c++ -c -pipe -Os -Wall -W -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_SHARED -I/fink/lib/qt4-x11/mkspecs/macx-g++ -I. -I/fink/lib/qt4-x11/include/QtCore -I/fink/lib/qt4-x11/include/QtCore -I/fink/lib/qt4-x11/include -I. -I. -o qtdirs.o qtdirs.cpp
c++ -headerpad_max_install_names -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib -o qtdirs qtdirs.o -L/fink/lib/qt4-x11/lib -lQtCore -L/fink/lib/freetype219/lib -L/fink/lib/fontconfig2/lib -L/fink/lib -L/usr/X11R6/lib -L/fink/lib/qt4-x11/lib -lresolv -lz -lm -lgthread-2.0 -lglib-2.0 -lintl -liconv -Wl,-framework,ApplicationServices
Error: Failed to determine the layout of your Qt installation. Try again using
the --verbose flag to see more detail about the problem.

I have no idea how to tell what's going on there. :(

Could someone tell me what I'm doing wrong? I am really eager to try QBzr but stuff keeps cropping up that is way out of my league. :(

Revision history for this message
Launchpad Janitor (janitor) said :
#8

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Zearin (zearin) said :
#9

Still stuck on this. Any suggestions?

Revision history for this message
Zearin (zearin) said :
#10

Some progress. I did a fresh install of QT and SIP. Where I'm stuck now is in running ./configure.py for PyQT4.

Here's my Terminal output:
...
129-2-134-74:PyQt-mac-gpl-4.4.2 tony$ python ./configure.py
Determining the layout of your Qt installation...
This is the GPL version of PyQt 4.4.2 (licensed under the GNU General Public
License) for Python 2.5.1 on darwin.

Type '2' to view the GPL v2 license.
Type '3' to view the GPL v3 license.
Type 'yes' to accept the terms of the license.
Type 'no' to decline the terms of the license.

Do you accept the terms of the license? yes
Checking to see if the QtGui module should be built...
Checking to see if the QtHelp module should be built...
Checking to see if the QtNetwork module should be built...
Checking to see if the QtOpenGL module should be built...
Checking to see if the QtScript module should be built...
Checking to see if the QtSql module should be built...
Checking to see if the QtSvg module should be built...
Checking to see if the QtTest module should be built...
Checking to see if the QtWebKit module should be built...
Checking to see if the QtXml module should be built...
Checking to see if the QtXmlPatterns module should be built...
Checking to see if the phonon module should be built...
Checking to see if the QtAssistant module should be built...
Checking to see if the QtDesigner module should be built...
Qt v4.4.1 free edition is being used.
Qt is built as a framework.
SIP 4.7.7 is being used.
The Qt header files are in /usr/include.
The shared Qt libraries are in /Library/Frameworks.
The Qt binaries are in /Developer/Tools/Qt.
The Qt mkspecs directory is in /usr/local/Qt4.4.
These PyQt modules will be built: QtCore QtGui QtHelp QtNetwork QtOpenGL
QtScript QtSql QtSvg QtTest QtWebKit QtXml QtXmlPatterns phonon QtAssistant
QtDesigner.
The PyQt Python package will be installed in /Library/Python/2.5/site-packages.
The Designer plugin will be installed in
/Developer/Applications/Qt/plugins/designer.
The PyQt .sip files will be installed in
/System/Library/Frameworks/Python.framework/Versions/2.5/share/sip/PyQt4.
pyuic4, pyrcc4 and pylupdate4 will be installed in
/System/Library/Frameworks/Python.framework/Versions/2.5/bin.
Generating the C++ source for the QtCore module...
sip: sip/QtCore/qxmlstream.sip:213: Incorrect number of arguments to Python slot
Error: Unable to create the C++ code.
...

Okay, so, looks like this isn't a program that's missing on my machine. How can I fix this if the script is passing an incorrect number of arguments somewhere?

Revision history for this message
Launchpad Janitor (janitor) said :
#11

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Zearin (zearin) said :
#12

Tried starting the whole process over, just to be certain I got everything "clean" and "right". No change. :(

I would really love to use QBzr…I am sad that I cannot.

Can someone help?

Revision history for this message
Launchpad Janitor (janitor) said :
#13

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Zearin (zearin) said :
#14

I opened this question 9 months ago. It's expired 3 times since then, and I'm still no closer to getting this to work.

I understand if there is a shortage of developers with Macs…but is there honestly no hope of finding at least ONE person who might be able to help? I've done my best and provided as much info as I could. Since Qbzr's description claims that it is “a simple Qt cross-platform frontend”, doesn't anybody care about my platform? Or am I just screwed?

Revision history for this message
Alexander Belchenko (bialix) said :
#15

Look at the answer to this question: https://answers.launchpad.net/qbzr/+question/10213

Can you help with this problem?

Provide an answer of your own, or ask Zearin for more information if necessary.

To post a message you must log in.