using pyqtdeploy with homebrew installation of Qt5

527 Views Asked by At

I'm trying out the pyqdeploy tutorial at http://pyqt.sourceforge.net/Docs/pyqtdeploy/tutorial.html. I'm working on an iMac, OS 10.11, latest XCode installed, and homebrew installations of Qt5.5.1, Python 3.5, sip, and PyQt5. I can run the pyqtdeploy GUI okay and everything seems to be fine until it gets to the "make" step. At that point I get a "make failed" warning. The details read

ld: library not found for -lQtGui clang: error: linker command failed with exit code 1 (use -v to see invocation) make: ***[pyqtdeploy.app/Contents/MacOS/pyqtdeploy] Error 1

I've been banging my head against this wall for a several days now, I'd appreciate any suggestions people might have about this.

1

There are 1 best solutions below

1
On

Lets try figuring it out together - I'm a pure newbie here, but I have some ideas, that may be helpful.

So if you try opening the Makefile for your project and search it for "lQtGui" string, you will find the LIBS definition string, something like that (in my case):

LIBS = $(SUBLIBS) -F/Users/aimsson/Applications/Qt/5.5/clang_64/lib -L/Users/aimsson/Desktop/pyqt_test/osx/python/lib/python3.4/site-packages -lsip -L/Users/aimsson/Desktop/pyqt_test/osx/python/lib/python3.4/site-packages/PyQt5 -lQtGui -lQtCore -lQtWidgets -L/Users/aimsson/Desktop/pyqt_test/osx/python/lib -lpython3.4m -framework SystemConfiguration -framework CoreFoundation -framework QtWidgets -framework QtGui -framework QtCore -framework DiskArbitration -framework IOKit -framework OpenGL -framework AGL

As you can see here, the make command tries to link qtgui, qtcore, qtwidgets modules from existing PyQT5 library in your target python site-packages directory.

Try checking you have the pyqt5 installed, the paths are correct and it is statically built.

You may also try following this post from the very beginning. It was very helpful for me, and I hope it will be much more helpful for you.