Python PyQt安装10.7“;架构x86“U 64”的未定义符号;
正在尝试在OS X 10.7上安装PyQt:Python PyQt安装10.7“;架构x86“U 64”的未定义符号;,python,macos,pyqt,homebrew,Python,Macos,Pyqt,Homebrew,正在尝试在OS X 10.7上安装PyQt: g++ -headerpad_max_install_names -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -o w_qpyopengl.app/Contents/MacOS/w_qpyopengl -F/usr/local/Cellar/qt/4.8.6/lib -L/usr/local/Cellar/qt/4.8.6/lib -framework QtGui -L/opt/X1
g++ -headerpad_max_install_names -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -o w_qpyopengl.app/Contents/MacOS/w_qpyopengl -F/usr/local/Cellar/qt/4.8.6/lib -L/usr/local/Cellar/qt/4.8.6/lib -framework QtGui -L/opt/X11/lib -L/usr/local/Cellar/qt/4.8.6/lib -F/usr/local/Cellar/qt/4.8.6/lib -framework QtCore
Undefined symbols for architecture x86_64:
"_main", referenced from:
start in crt1.10.5.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [w_qpyopengl.app/Contents/MacOS/w_qpyopengl] Error 1
make[1]: *** [all] Error 2
make: *** [all] Error 2
Make文件配置为
python configure.py -d /Library/Python/2.7/site-packages/ -g -q /usr/local/bin/qmake --use-arch=x86_64
$PATH是
/usr/local/bin/brew:/Users/username/anaconda/bin:/usr/local/lib/python2.7/site-packages:/usr/local/sbin:/usr/bin:/bin:/usr/local/bin:/usr/sbin:/sbin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin:/usr/local/smlnj-110.75/bin
$LIBRARY\u路径为
$ echo $LIBRARY_PATH
/usr/lib:
我已经尝试过将/usr/lib链接到/opt/X11/lib(不存在)。crt1.10.5可在以下网址找到:
PyQt-mac-gpl-4.11 solidblanc$ locate crt1.10.5
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.7.sdk/usr/lib/crt1.10.5.o
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.8.sdk/usr/lib/crt1.10.5.o
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
/SDKs/iPhoneSimulator6.1.sdk/usr/lib/crt1.10.5.o
/usr/lib/crt1.10.5.o
不知道该怎么办。尝试使用
configure ng.py
而不是configure.py
如果出现错误致命错误:sipAPIQtCore.h:没有此类文件或目录
,请尝试添加
INCPATH+=/path/to/PyQt-mac-gpl-4.11/_qt
转到configure mg.py
命令。比如说,
python configure-ng.py -g --sip-incdir=$HOME/Downloads/sip-4.16.1/siplib INCPATH+=$HOME/Downloads/PyQt-mac-gpl-4.11/_qt
如果这构建了一个经常崩溃的PyQt版本(而且可能会崩溃,因为它对我来说确实如此),尝试在没有
-g
的情况下使用configure ng进行配置我会收到大量重复的符号错误:重复的符号\uuuz17qpycore\u post\u initP7\u对象在:qpycore\u post\init.o重复的符号\uqpycore\u签名\u attr\u名称在:qpycore\u post\u init.o重复的符号\uqpycore\u名称在:qpycore\u post\u init.o ld:3重复的符号体系结构x86_64