关于python:GCC错误:在使用xcode 4.5.1在osx lion中安装pyqt4时无法创建c ++文件

关于python:GCC错误:在使用xcode 4.5.1在osx lion中安装pyqt4时无法创建c ++文件

Intel mac osx lion 10.7。
安装了 xcode 4.5.1 版本,还从 xcode 偏好设置安装了命令行工具。
无法从源代码安装 python 3.2.x,因为我想从 python-c 函数创建 so 文件。
因此我最终使用 python3.2.x.dmg 并成功安装了它和 Qt.dmg


最后,我想使用适用于 i386 架构的 python 安装 PyQt 模块,但发现以下问题。

    python3 configure.py --use-arch i386
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 3.2.2 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.4 free edition is being used.
Qt is built as a framework.
SIP 4.13.2 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.7.
These PyQt modules will be built: QtCore, QtGui, QtHelp, QtMultimedia,
QtNetwork, QtDBus, QtDeclarative, QtOpenGL, QtScript, QtScriptTools, QtSql,
QtSvg, QtTest, QtWebKit, QtXml, QtXmlPatterns, phonon, QtDesigner.
The PyQt Python package will be installed in
/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages.
PyQt is being built with generated docstrings.
PyQt is being built with 'protected' redefined as 'public'.
The Designer plugin will be installed in
/Developer/Applications/Qt/plugins/designer.
The PyQt .sip files will be installed in
/Library/Frameworks/Python.framework/Versions/3.2/share/sip/PyQt4.
pyuic4, pyrcc4 and pylupdate4 will be installed in
/Library/Frameworks/Python.framework/Versions/3.2/bin.
Generating the C++ source for the QtCore module...
sip: Usage: sip [-h] [-V] [-a file] [-b file] [-c dir] [-d file] [-e] [-g] [-I dir] [-j #] [-k] [-m file] [-o] [-p module] [-P] [-r] [-s suffix] [-t tag] [-T] [-w] [-x feature] [-X id:file] [-z file] [file]
Error: Unable to create the C++ code.

希望我不是第一个遇到这种安装错误的人,因为我之前已经使用 xcode 4.1 成功安装了它。希望 GCC(xcode 4.5 中的 livm GCC)中有一些变化,这可能是原因。

如果有人有办法解决这个问题,我们将非常感激。

谢谢。

答案1

发现问题并成功安装sip和pyqt4

空间不应该位于我们构建/配置的路径中。

一旦我从配置路径中删除空格并成功安装 sip 和 pyqt4

感谢 BenjiWiebe 和大家

相关内容