[英]using pyqtdeploy with homebrew installation of Qt5
I'm trying out the pyqdeploy tutorial at http://pyqt.sourceforge.net/Docs/pyqtdeploy/tutorial.html . 我正在http://pyqt.sourceforge.net/Docs/pyqtdeploy/tutorial.html上尝试pyqdeploy教程。 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.
我正在使用iMac,OS 10.11,已安装最新的XCode以及Qt5.5.1,Python 3.5,sip和PyQt5的自制安装。 I can run the pyqtdeploy GUI okay and everything seems to be fine until it gets to the "make" step.
我可以运行pyqtdeploy GUI了,一切正常,直到进入“ make”步骤为止。 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 ld:找不到用于-lQtGui铛的库:错误:链接器命令失败,退出代码为1(使用-v查看调用)make:*** [pyqtdeploy.app/Contents/MacOS/pyqtdeploy]错误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. 我已经将头撞在墙上这几天了,我很感谢人们对此提出的任何建议。
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): 因此,如果您尝试为您的项目打开Makefile并在其中搜索“ lQtGui”字符串,则将找到LIBS定义字符串,例如(在我的情况下):
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. 如您所见,make命令尝试从目标python site-packages目录中现有的PyQT5库链接qtgui,qtcore,qtwidgets模块。
Try checking you have the pyqt5 installed, the paths are correct and it is statically built. 尝试检查您是否安装了pyqt5,路径正确且已静态构建。
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.
这对我很有帮助,希望对您有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.