我花了几个小时(天(尝试在MacOS Sierra上安装PySide
而没有成功。我阅读并遵循了Google搜索给出的许多解释,包括stackoverflow上的线程。
我的最新尝试是使用PIP:
pip install PySide
但是我遇到了很多错误:第一个是:
Qt QTGUI library not found.
Qt QTXML library not found.
Qt QTCORE library not found.
CMake Error at ApiExtractor/CMakeLists.txt:82 (qt4_add_resources):
Unknown CMake command "qt4_add_resources".
-- Configuring incomplete, errors occurred!
See also "/private/var/folders/jn/_85_tmmn3bjgrfdprd_l2c640000gn/T/pip-build-rjWn4w/PySide/pyside_build/py2.7-qt5.8.0-64bit-release/shiboken/CMakeFiles/CMakeOutput.log".
error: Error configuring shiboken
----------------------------------------
Failed building wheel for PySide
Running setup.py clean for PySide
Failed to build PySide
最后一个是:
命令"/usr/local/opt/python/bin/python2.7 -u -c"导入setuptools, tokenize; file ='/private/var/folver/jn/_85_tmmn3bjgrfdprd_l2c640000gn/t/t/pip-build-rjwn4w/pyside/pyside/setup.py' 'Open',打开(( file (; code = f.read((。替换(' r n',, ' n'(; f.close((; exec(compile(代码, file ,'exec'(("安装 -Record/var/folders/jn/_85_tmmn3bjgrfdprd_l2c640000gn/t/pip-1xbkki-record/install-record.txt - 单词 - version-externsmaned-compile"失败了错误代码1 /private/var/文件夹/jn/_85_tmmn3bjgrfdprd_l2c640000gn/t/pip-build-rjwn4w/pyside/pyside/
这足以解释问题吗?我想我的问题是(是(:我在做什么错?我该如何完成这项工作?(安装Python 2.7,QT5,Macos Sierra的Pyside。(
请让我知道我是否需要提供其他信息才能以某种方式得到帮助。
任何帮助将不胜感激!
谢谢,
Stefan
[edit]链接问题后,brew install qt5 cmake libxslt libxml2
Warning: qt is a keg-only and another version is linked to opt.
Use `brew install --force` if you want to install this version
Warning: cmake-3.8.0 already installed
Warning: libxslt is a keg-only and another version is linked to opt.
Use `brew install --force` if you want to install this version
Warning: libxml2 is a keg-only and another version is linked to opt.
Use `brew install --force` if you want to install this version
stefan-mbcn:export_hook stefan$ brew install --force qt5 cmake libxslt libxml2
Warning: qt-5.8.0_2 already installed, it's just not linked.
Warning: cmake-3.8.0 already installed
Warning: libxslt-1.1.29 already installed, it's just not linked.
Warning: libxml2-2.9.4_2 already installed, it's just not linked.
stefan-mbcn:export_hook stefan$
我假设您已经在此线程上检查了此线程,其中指出不支持Macos Sierra。您仍然可以尝试Minigeeks解决方案。还要看看Pyside的Wiki。如果您尚未尝试,请安装Homebrew并执行以下操作:
brew install qt5 cmake libxslt libxml2