我正在尝试安装一个python2.7程序,它将PyQt作为依赖项。我的mac默认为3.5.2,因此我使用virtualenv和python 2.7创建了一个虚拟环境。
还有很多其他的依赖项,但除了PyQt之外它们都在工作。我已经下载并解压缩了源代码,但输入了
(venv)$ python configure-ng.py --qmake ~/anaconda/bin/qmake-qt4 --verbose
返回
Querying qmake about your Qt installation...
Determining the details of your Qt installation...
/Users/evansmith/anaconda/bin/qmake-qt4 -spec macx-g++ -o qtdetail.mk qtdetail.pro
make -f qtdetail.mk
g++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_SHARED -I../../../anaconda/lib/qt4/mkspecs/macx-g++ -I. -I../../../anaconda/include/qt4/QtCore -I../../../anaconda/include/qt4 -I. -o qtdetail.o qtdetail.cpp
g++ -headerpad_max_install_names -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -o qtdetail.app/Contents/MacOS/qtdetail qtdetail.o -L/Users/evansmith/anaconda/lib -lQtCore -L/Users/evansmith/anaconda/lib
Undefined symbols for architecture x86_64:
"__Unwind_Resume", referenced from:
_main in qtdetail.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [qtdetail.app/Contents/MacOS/qtdetail] Error 1
Error: Failed to determine the detail of your Qt installation. Try again using
the --verbose flag to see more detail about the problem.
在你说“brew pyqt”之前我听说自制软件与virtualenv不兼容。我应该用它吗?
我唯一能想到的是virtualenv python无法访问/ anaconda / bin /中的qmake文件。有办法解决这个问题吗?
答案 0 :(得分:0)
看起来你已经在使用Anaconda了。
只需使用conda
conda create -n py27 python=2.7
激活它:
source activate py27
并安装PyQt 4:
conda install pyqt