2017-04-23 212 views
0

我花了幾個小時(天)嘗試在macOS sierra上安裝PySide,但沒有成功。我閱讀並遵循谷歌搜索給出的許多解釋,包括stackoverflow上的線程。PySide安裝錯誤 - python 2.7 - QT5 - macOS Sierra

我的最新嘗試使用PIP:

pip install PySide 

但我發現了一堆錯誤: 第1個是:

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」import setuptools, tokenize; 文件 = '/私有的/ var /文件夾/ JN/_85_tmmn3bjgrfdprd_l2c640000gn/T/PIP-積聚rjWn4w/PySide/setup.py'; F = GETATTR(標記化, '開',打開)(文件);代碼= f.read()。replace('\ r \ n', '\ n'); f.close(); exec(編譯(代碼,文件,'exec'))「install - 記錄/var/folders/jn/_85_tmmn3bjgrfdprd_l2c640000gn/T/pip-1xbkki-record/install-record.txt --single-version-external-managed -compile「在 /private/var/folders中出錯,代碼爲1/jn/_85_tmmn3bjgrfdprd_l2c640000gn/T/pip-build-rjWn4w/PySide/

這些信息足以解釋問題嗎? 我想我的問題是:我做錯了什麼?我該如何做這項工作? (安裝Pyside for python 2.7,qt5,macOS sierra。)

請讓我知道如果我需要提供其他信息以便以某種方式獲得幫助。

任何幫助將不勝感激!

感謝,

斯特凡

[編輯]鏈接沖泡後問題安裝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$ 

回答

1

我假設你已經檢查this thread on SO,其中指出,MacOS的塞拉不支持。你仍然可以嘗試minigeeks解決方案。也看看wiki of pyside。如果您尚未嘗試安裝自制軟件,請執行以下操作:

brew install qt5 cmake libxslt libxml2 
+0

謝謝@LaughU。我確實讀過這個主題,並且嘗試了你提到的命令,但是我收到了'鏈接'錯誤,我不知道如何在不破壞其他任何內容的情況下完全修復。 我編輯了原始問題並添加了鏈接部分。 –