On a fresh Mac OSX 10.8 install, I've installed Quantum GIS from Kingchaos binaries and it's running fine. I'm trying to develop a plugin for QGIS using Plugin Builder. The skel that Plugin Builder produces should work off-the-shelf, but it does not compile using the makefile. Somewhere python can't find (pyuic.py), and it searches for the /Users/kyngchaos/... path. This user does not exist on my system:(

Here are my ENVS on .profile:

export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH
export PYTHONPATH=/Applications/QGIS.app/Contents/Resources/python
export DYLD_LIBRARY_PATH="/Applications/QGIS.app/Contents/MacOS/lib:/Applications/Qgis.app/Contents/Frameworks"
export PATH="/Applications/QGIS.app/Contents/MacOS/bin:$PATH"

Here is the ouptput of make:

pyuic4 -o ui_teste.py ui_teste.ui
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file '/Users/kyngchaos/Applications/qgis-python27/Applications/QGIS.app/Contents/MacOS/../Resources/python/PyQt4/uic/pyuic.py': [Errno 2] No such file or directory
make: *** [ui_teste.py] Error 2

Thanks for reading.

2 Answers 2


A hackish workaround would be to create a symlink with that username to your own home dir. But it seems either ui_teste.py or ui_teste.ui has that path hardcoded, so check them out (or search the whole hierarchy where they are for "kyngchaos"). There's also a chance the pyqt4 package you installed is buggy, but first try the previous suggestion.

  • Hi, thanks for helping! The fix was, edit /Applications/QGIS.app/Contents/MacOS/bin/pyuic4 and correct the path, like this: #!/bin/sh exec pythonw2.7 /Applications/QGIS.app/Contents/MacOS/../Resources/python/PyQt4/uic/pyuic.py ${1+"$@"} Commented Sep 18, 2012 at 14:35

I have recently committed a fix for this in the CMake build commands. I would appreciate if you can test the resultant file under Mt. Lion, which would have the contents:

exec pythonw2.7 "$(/usr/bin/dirname "$0")/../../Resources/python/PyQt4/uic/pyuic.py" ${1+"$@"}

This fix is in the nightly Mac builds available here. The fix should allow you to move the app wherever you like in the file system (no hard-coded path). If you do move the app from /Applications remember to update your PYTHONPATH accordingly for plugin development.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.