【发布时间】:2018-03-18 06:38:28
【问题描述】:
我在安装 PySide 时遇到了很多麻烦。我按照本教程中的建议使用 brew install qt 安装了 Qt:pyside.readthedocs.io/en/latest/installing/macosx.html。
我的 Mac 已更新至 High Sierra 10.13.3。当我运行 pip install -U Pyside 时,我得到以下打印输出:
Failed building wheel for Pyside
Running setup.py clean for Pyside
Failed to build Pyside
Installing collected packages: Pyside
Running setup.py install for Pyside ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/var/folders/4x/bkrfh91103936h2x82l9x_480000gn/T/pip-build-HTn1Jd/Pyside/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/4x/bkrfh91103936h2x82l9x_480000gn/T/pip-nRGV6n-record/install-record.txt --single-version-externally-managed --compile:
Removing /private/var/folders/4x/bkrfh91103936h2x82l9x_480000gn/T/pip-build-HTn1Jd/Pyside/pyside_package
running install
running build
Python architecture is 64bit
error: Failed to find qmake. Please specify the path to qmake with --qmake parameter.
命令
"/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/var/folders/4x/bkrfh91103936h2x82l9x_480000gn/T/pip-build-HTn1Jd/Pyside/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/4x/bkrfh91103936h2x82l9x_480000gn/T/pip-nRGV6n-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/4x/bkrfh91103936h2x82l9x_480000gn/T/pip-build-HTn1Jd/Pyside/
关于如何解决这个问题的任何想法?谢谢!
【问题讨论】:
-
首先,您确定要为内置 Python 2.7 安装
PySide吗? -
二、你安装Qt了吗?如果是这样,您是如何安装的?
-
是的,我已经安装了 Qt。这是我遵循的教程:pyside.readthedocs.io/en/latest/installing/macosx.html
-
不确定我是否要为内置安装 PySide... 抱歉,我对此了解不多。感谢您的帮助!
-
我猜第一个问题是,你想使用 Python 2.7(此时已经 8 岁,不到 2 年就不再支持)还是 3.6?