PyQt配置和安装错误 [英] PyQt configuration and installation error

查看:112
本文介绍了PyQt配置和安装错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Macbook pro上安装Maya的PyQt.我已经成功安装了Qt和Sip,但没有安装PyQt.

I'm trying to install PyQt for Maya on my Macbook pro. I've succesfully installed Qt and Sip and I'm failing to install PyQt.

我使用的版本是

OSX 10.6.8,Qt 4.7.1-修改的Autodesk Qt,Sip 4.13.2,PyQt 4.9.1

OSX 10.6.8, Qt 4.7.1 - modified Autodesk Qt, Sip 4.13.2, PyQt 4.9.1

在配置pyqt时成功,但是在构建时失败.我认为这可能与配置中使用的目录/Users/warnold有关.它被列出了四次,但是目录不存在,我也不知道它来自哪里. Qt安装在/usr/local/Trolltech/Qt-4.7.1

When configuring pyqt it succeeds but when building it fails. I think it might have something to do with the directory /Users/warnold being used in the configuration. It's listed four times but the directory doesn't exist and I don't know where it came from. Qt is installed at /usr/local/Trolltech/Qt-4.7.1

配置我得到以下信息:

export QTDIR=/usr/local/Trolltech/Qt-4.7.1/
export PATH=/usr/local/Trolltech/Qt-4.7.1/bin:$PATH
export QMAKESPEC=/usr/local/Trolltech/Qt-4.7.1/mkspecs/macx-g++
export DYLD_LIBRARY_PATH=/usr/local/Trolltech/Qt-4.7.1/lib/
/Applications/Autodesk/maya2013/Maya.app/Contents/bin/mayapy configure.py LIBDIR_QT=/usr/local/Trolltech/Qt-4.7.1/lib INCDIR_QT=/usr/local/Trolltech/Qt-4.7.1/include MOC=/usr/local/Trolltech/Qt-4.7.1/bin/moc --no-designer-plugin --use-arch=x86_64

Determining the layout of your Qt installation...
This is the GPL version of PyQt 4.9.1 (licensed under the GNU General Public
License) for Python 2.6.4 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             
Found the license file pyqt-gpl.sip.
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 QtMultimedia module should be built...
Checking to see if the QtNetwork module should be built...
Checking to see if the QtDBus module should be built...
Checking to see if the QtDeclarative 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 QtScriptTools 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.7.1 free edition is being used.
SIP 4.13.2 is being used.
The Qt header files are in /Users/warnold/qt/qt-4.7.1/include.
The shared Qt libraries are in /Users/warnold/qt/qt-4.7.1/lib.
The Qt binaries are in /Users/warnold/qt/qt-4.7.1/bin.
The Qt mkspecs directory is in /Users/warnold/qt/qt-4.7.1.
These PyQt modules will be built: QtCore.
The PyQt Python package will be installed in
/Applications/Autodesk/maya2013/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages.
PyQt is being built with generated docstrings.
PyQt is being built with 'protected' redefined as 'public'.
The PyQt .sip files will be installed in
/Applications/Autodesk/maya2013/Maya.app/Contents/bin/../Frameworks/Python.framework/Versions/Current/share/sip/PyQt4.
pyuic4, pyrcc4 and pylupdate4 will be installed in
/Applications/Autodesk/maya2013/Maya.app/Contents/bin/../Frameworks/Python.framework/Versions/Current/bin.
Generating the C++ source for the QtCore module...
Creating the Makefile for the QtCore module...
Generating the C++ source for the Qt module...
Creating the Makefile for the Qt module...
Creating QScintilla API file...
Creating top level Makefile...
Creating QPy support library for QtCore Makefile...
Creating QPy support libraries Makefile...
Creating pyuic4 wrapper...
Creating pyuic4 Makefile...
pylupdate4 and pyrcc4 will not be built because the Qt XML module is missing.
Creating pyqtconfig.py...
Exception TypeError: TypeError("'NoneType' object is not callable",) in <bound method Popen.__del__ of <subprocess.Popen object at 0x100495450>> ignored

构建时,我会得到一堆以

building I get a bunch of code which ends with

ld: library not found for -lQtCore
collect2: ld returned 1 exit status
make[1]: *** [QtCore.so] Error 1
make: *** [all] Error 2

我完全不知所措.不确定如何纠正此问题.请帮忙.

I'm at a complete loss. Not sure how to rectify this. Please help.

推荐答案

我已经对此主题进行了详细的撰写:
http://www.justinfx.com/2011/11/09/installing-pyqt4-for-maya-2012-osx/

I have a detailed write-up on this topic already:
http://www.justinfx.com/2011/11/09/installing-pyqt4-for-maya-2012-osx/

它还包含可供您安装的现成软件包,包括Maya 2013 for Lion.我没有在Snow Leopard上试用过Lion软件包,但是我怀疑它应该工作,因为它是使用相同的SDK和arch构建的.

It also contains ready built packages for you to install, including Maya 2013 for Lion. I have not tried the Lion package on Snow Leopard but I suspect it should work since it was built with the same SDK and arch.

我创建了一个存储库来存储每个Maya版本的构建脚本:
https://github.com/justinfx/MyQt4

I had created a repo to store build scripts for each maya version:
https://github.com/justinfx/MyQt4

原始的Maya 2011手动PyQt安装说明:
http://www.justinfx.com/2011/01/07/installing-pyqt-for-maya-2011-osx/
通过将Qt,Sip,PyQt的软件包版本更新为适当的版本,您仍然可以将相同的过程应用于较新的版本.但是MyQt回购的想法是消除烦恼,而仅通过脚本即可完成.

And the original write up for Maya 2011 manual PyQt installation:
http://www.justinfx.com/2011/01/07/installing-pyqt-for-maya-2011-osx/
You can still apply this same procedure to newer versions, by just updating the package versions of Qt, Sip, PyQt to the appropriate ones. But the idea of the MyQt repo was to take the frustration out of it and just do it from a script.

这篇关于PyQt配置和安装错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆