- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在拼命安装 PyQt5。到目前为止,我已经在 OSx Mavericks、Ubuntu VM 和 W7 VM 上进行了尝试。似乎什么都不起作用。这是我尝试过的。
我尝试过自制
brew update
brew install PyQt5
brew install 命令的输出:
==> Installing dependencies for pyqt5: qt5, sip
==> Installing pyqt5 dependency: qt5
==> Downloading http://download.qt-project.org/official_releases/qt/5.1/5.1.1/si
Already downloaded: /Library/Caches/Homebrew/qt5-5.1.1.tar.gz
==> ./configure -prefix /usr/local/Cellar/qt5/5.1.1 -system-zlib -confirm-licens
==> make
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -stdlib=libc++ -mmacosx-version-min=10.7 -single_module -dynamiclib -o libqsqlite.dylib .obj/release-shared/smain.o .obj/release-shared/qsql_sqlite.o .obj/release-shared/sqlite3.o .obj/release-shared/moc_qsql_sqlite_p.o -F/private/tmp/qt5-jmbp/qt-everywhere-opensource-src-5.1.1/qtbase/lib -framework QtSql -framework QtCore
mv -f libqsqlite.dylib ../../../../plugins/sqldrivers/
make[2]: *** [sub-plugins-make_first] Error 2
make[1]: *** [sub-src-make_first] Error 2
make: *** [module-qtbase-make_first] Error 2
READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting
These open issues may also help:
https://github.com/mxcl/homebrew/issues/23699
https://github.com/mxcl/homebrew/issues/23480
https://github.com/mxcl/homebrew/pull/22283
https://github.com/mxcl/homebrew/issues/23806
我已尝试了所有问题并进行了故障排除。似乎没有什么帮助。
我也尝试过手动安装: sudo python3 configure.py --qmake=/Users/Thomas/Qt/5.1.1/clang_64/bin/qmake --sip=/Users/Thomas/Downloads/sip-4.15.3/sipgen/sip
工作正常。然后,当我尝试 sudo make 时,它不断给出:
In file included from ../../../../Qt/5.1.1/clang_64/include/QtCore/qglobal.h:70:
../../../../Qt/5.1.1/clang_64/include/QtCore/qsystemdetection.h:243:6: warning:
"This version of OS X is unsupported" [-W#warnings]
# warning "This version of OS X is unsupported"
^
1 warning generated.
我认为这个警告并不重要,因为 qglobal.h 将最大版本定义为 10.8,而我运行的是 10.9。
sudo make install
不会给我任何错误,但是当我尝试以 super 用户身份运行 Python (sudo python3
) 时,并尝试 dir(PyQt5 )
Python 崩溃。请注意,已找到该包。
在某处读到我需要 Python 开发 header 。所以我在 OSx 上从源代码编译了 Python3.3.2。这没有给我带来更好的结果..
还没有尝试过这么多。似乎使用二进制 GUI 安装程序进行安装。这里的问题是 dir(PyQt5) 列出了一些默认的 Python 内容(带下划线),但没有任何来自 Qt* 的实际内容。对 Windows 不太了解,也不想了解(VM 真的很慢)。
安装过程中没有错误或警告(与 OSx 安装过程中使用的命令完全相同),但当我尝试 dir(PyQt5)
时,Python 也会中断。没有错误或任何情况。
我尝试搜索遇到的每个错误,一些结果让我再次前进。不过,这就是我陷入困境并可能停止的地方。如果有人知道的话请帮忙。
最佳答案
目前不可能通过标准/简单的方式在 Mac OS X(包括 Yosemite)中安装 PyQt5
。我已经尝试了所有方法,但只有一件事有效 - 编译并安装它。在这个 Action 这里没什么难做的,我写了一个gist包含在 Yosemite 上安装 pyqt5
的步骤。
关于python - PyQt5 不会为 Python 3 安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19998105/
我现在已经用 PyQt 做了几个项目,而且我越来越熟悉 Qt 采用的模型/ View 思想流派。我已经将它用于列表和表格 View 之类的东西,它们背后有一个自定义模型来显示和操作数据。我使用委托(d
import sys from PyQt4.QtCore import * from PyQt4.QtGui import * class MainWindow(QMainWindow):
使用下面的示例代码(受 here 的严重影响),右键单击上下文菜单并没有真正正确对齐。 从屏幕截图中可以看出,生成的菜单在鼠标光标上方相当多的位置。我希望菜单的左上角与鼠标指针完全对齐。 有没有办法对
所以我创建了一个自定义上下文菜单,但我想根据某些值将树小部件的某些行中的某些项目灰显。如何禁用菜单上的项目? myUI.setContextMenuPolicy( Qt.CustomContextMe
是否可以禁用 QComboBox在 pyqt 中,就像我们可以在 Win Forms(C#) 中那样做,因为我在 QComboBox 中找不到任何选项手动的。我想启用 QcomboBox仅当管理员登录
我想将 QComboBox 与元组中的“键”和“值”一起使用,该元组类似于 django 模型中使用的元组。例如,我对一个人的性别有以下结构。 SEX_CHOICES = (('M', 'Male')
是否可以让 Altair 或 Vega(-Lite) 渲染到 PyQt 小部件,类似于支持多个后端的 Matplotlib?我知道我可以使用 Qt WebView 小部件来呈现带有 Vega 嵌入的网
在下面的示例代码中(受 here 的影响很大),我希望选择单击单元格的整行而不是单个单元格。如何更改代码以合并它? import re import operator import os import
我正在尝试禁用关闭“x”按钮,并且我认为通过将 DockWidgetFeature 设置为仅可移动和可 float 即可工作。 def CreateDockWidget (self): Pan
我已经按照 Yasin Uludag 的一些有用的在线教程来尝试使用 PyQt(或者更确切地说是 PySide)来创建一个简单的 TreeView ,但是我在使用工具提示时遇到了问题。在以下代码中,工
我正在尝试创建一个场景,我需要从 mousePressEvent 位置画线到最新的鼠标 moveposition 这意味着我需要调用 paintEvent 来自 mousePressEvent ,这可
是Python 3的组合和 PyQt 4受到推崇的?有没有其他选择? 最佳答案 我不明白为什么不,有一个 version available对于正常工作的 Python 3,如果你真的需要 Qt,唯一
我正在尝试显示从二进制文件中读取的图像数据(我编写了用于从文件中检索此数据并将其存储为图像以供 QImage() 使用的代码)。我想做的是将 slider 连接到图形 View 小部件,以便当您移动
我已经准备了很多关于如何在 python 和 pyqt 中将多个信号连接到同一个事件处理程序的帖子。例如,将多个按钮或组合框连接到同一功能。 许多示例展示了如何使用 QSignalMapper 执行此
我有一个 PyQt 主窗口,当用户按下某个按钮时,我需要从中获取一串用户输入。 这是我的用户输入窗口代码: class InputDialog(QtGui.QDialog): ''' t
编辑: 以下 buildout.cfg 用于构建 Qt、PyQt 和 SIP [buildout] parts = pyqt [pyqt] recipe = zc.recipe.cmmi ur
我目前正在开发一个应用程序,该应用程序可以使用 PyQt 访问 sqlalchemy 数据库并将其内容显示到 TableView 或其他一些小部件中。现在为了简单起见,我们只说这是一个电话簿,上面有姓
使用我现在拥有的代码,我可以成功地播放文件中的 .mp3 数据。但是我需要使用 QtCore.QBuffer(不是来自文件)播放相同的数据。当我使用文档的示例时,它会出现意外类型的 QBuffer 错
安装 sip 后,我在尝试安装 PyQt-x11-gpl-4.11 时不断收到这个可爱的错误消息。 mycommandline$ python configure-ng.py --verbose Qu
我正在为一个项目使用 PyQt。但并非突然间我收到一个错误: QPixmap: It is not safe to use pixmaps outside the GUI thread in PyQt
我是一名优秀的程序员,十分优秀!