- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
$ python -c '从 gi.repository 导入 Gtk'-c:1: PyGIWarning: 导入 Gtk 时未先指定版本。在导入之前使用 gi.require_version('Gtk', '3.0') 以确保加载正确的版本。我该怎么办?
最佳答案
您收到警告是因为您在导入 gtk 时未指定版本。这是因为 gtk 有多个版本,所以你应该声明要使用哪个版本。
为此,您可以打开 python 终端(在命令行中键入 python)并执行以下代码:
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
关于python - PyGIWarning : Gtk and Rsvg were imported without specifying a version first. 使用 gi.require_version,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63631072/
“gi”库代表什么?我正在考虑“图形界面”,但没有在这里得到确认 https://pygobject.readthedocs.io/en/latest/guide/api/api.html 最佳答案
我怎样才能完成这项工作: var storedValues = $(''); // contains excel paste content from Libreoff
我目前正在为 Unity 5.4 中的照明设置而苦苦挣扎,并且因为我正在学习如何使用它们,所以我试图了解它们中的每一个是如何工作的。我无法弄清楚环境遮挡的实际作用。文档中的描述也没有为我清楚地解释这一
对于 libnotify,我使用以下代码 import gi gi.require_version('Notify', '0.7') from gi.repository import Notify
var metin = "baris"; var icerikoku = "Hello Baris. What is surname Baris. Bye bye baris. How are you
这是我尝试运行的命令及其输出: $ python2 Python 2.7.8 (default, Sep 24 2014, 18:26:21) [GCC 4.9.1 20140903 (prerele
我看过this ,并尝试了以下代码: ln -s /usr/lib/python2.7/dist-packages/pygtk.pth tools/python_2_7_9/lib/python2.7
我无法理解 gi.repository 我在我的代码中使用了这个结构 from gi.repository import Gtk 但是如果我想使用某些组件,我会遇到导入错误 我搜索了一下,发现它适用于
我正在开发一个必须在 Windows 和 Linux 上 100% 兼容的应用程序。在 linux 上我没有问题,但在 windows 上我想出了这个消息:从 gi.repository 导入 Gtk
这个问题在这里已经有了答案: Reference - What does this regex mean? (1 个回答) 关闭 7 年前。 我在我的 JavaScript 代码中看到这样一行: v
我正在检查 TIBCO GI前几天,我印象深刻。 有人广泛使用过它吗? 你有什么想法? 您遇到过什么缺点? 它适用于 Internet 还是仅适用于 Intranet 应用程序? 我很感激你能就此提出
在探索 Kubernetes 模板的 yaml 定义时,我偶然发现了大小的不同定义。首先我认为这是关于 apiVersions 但它们是相同的。那么有什么区别呢?当两者相同时,哪个是正确的? stor
当在字符串 html 上使用 .match 函数时,以下代码返回一个包含匹配项的数组。 html = '123C / 456K' var matches = html.match('(
我正在尝试运行以下程序: import gi gi.require_version('Gst', '1.0') from gi.repository import GObject, Gst Bu 我得
我无法从 gi.repository 导入模块。特别不是 Gtk 和 GObject。 我在 Ubuntu 14.04 LTS 和重新安装后都遇到了这个错误也在 Linux Mint 17 上。 fr
我遵循了有关创建基本 Gi-Gtk 应用程序的教程。 现在我想通过将图像的源设置为一个字符串来对按钮按下使用react,我从常量字符串列表中随机选择该字符串: {-# LANGUAGE Overloa
使用 reflex-gi-gtk-0.2.0.0 时我可以从事件中访问动态: submitButtonE4 do path return "" -
我在 python3.6 中导入 gi 模块时遇到问题。当使用 python3.5 导入它时它工作正常但是当使用 python3.6 时我得到: ImportError: cannot import
我正在尝试创建一个 Python 通知应用程序。简而言之,这是我想做的: 1. 查看我的gmail帐号 2.显示未读邮件数量通知 3. 显示允许我打开 Chromium 的按钮(使用系统调用) 现在一
我正在尝试运行也使用“gi”模块的 python(版本 3.6.2)程序。当我尝试导入“gi”时,出现以下错误: Traceback (most recent call last): File "
我是一名优秀的程序员,十分优秀!