简体   繁体   English

在 Windows 10 上安装 gtk3 + Glade

[英]Installing gtk3 + glade on Windows 10

I am new to python and I have been trying to install gtk3 to use with glade to build a GUI with Python 2.7.我是 Python 新手,我一直在尝试安装 gtk3 以与 Glade 一起使用,以使用 Python 2.7 构建 GUI。 I have successfully installed Glade, however I am having some major issues finding and running gtk3 for windows.我已经成功安装了 Glade,但是我在为 Windows 查找和运行 gtk3 时遇到了一些主要问题。 I have visited the gtk website and have followed their instructions with the MSYS2 installer, but when I try to conda install with the anaconda prompt or import gtk, I get errors saying that there is no module named gtk.我访问了gtk 网站,并按照他们的说明使用 MSYS2 安装程序,但是当我尝试使用 anaconda 提示符进行 conda 安装或导入 gtk 时,我收到错误消息,指出没有名为 gtk 的模块。 I have also downloaded the win64 zip of gtk3 from tarnyko and have tried to put the unzipped file into Lib>site-packages ad then try to conda install and import, but still no luck.我还从tarnyko下载了 gtk3 的win64 zip,并尝试将解压缩的文件放入 Lib>site-packages ad,然后尝试 conda 安装和导入,但仍然没有运气。 I'm running on a 64 bit Windows 10 OS.我在 64 位 Windows 10 操作系统上运行。

Does anyone knows how to properly get everything installed and running?有谁知道如何正确安装和运行所有东西?

Please avoid the tarnyko releases, as they are out-of-date and unmaintained now (3.6 while the last GTK+ version as I'm writing this is 3.22).请避免使用 tarnyko 版本,因为它们现在已经过时且未维护(3.6,而我写这篇文章的最后一个 GTK+ 版本是 3.22)。 The preferred way to install GTK on Windows is through MSYS2, as stated on the GTK+ download page for Windows .在 Windows 上安装 GTK 的首选方法是通过 MSYS2,如 Windows 的GTK+ 下载页面所述 I rewrote that page a few weeks ago, and I'll do my best to fix things there if needed.几周前我重写了那个页面,如果需要,我会尽力修复那里的问题。

Now please explain this:现在请解释一下:

when I try to conda install with the anaconda prompt or import gtk, I get errors saying that there is no module named gtk当我尝试使用 anaconda 提示符进行 conda 安装或导入 gtk 时,我收到错误消息,指出没有名为 gtk 的模块

What do you mean by conda install ?你说的conda install是什么意思? You should only use the pacman package manager provided by MSYS2 to setup your environment.您应该只使用 MSYS2 提供的pacman包管理器来设置您的环境。 Did you follow all the instructions on http://www.msys2.org ?您是否遵循了http://www.msys2.org上的所有说明? Did you install using pacman the gtk3 library?您是否使用pacman安装了 gtk3 库? Did you install the python bindings as stated in Step 4 (optional): Install the Python bindings ?您是否按照步骤 4(可选):安装 Python 绑定中的说明安装了 Python 绑定

I got a running system by just exactly following step by step the instructions I have put on the GTK website.我完全按照我在 GTK 网站上发布的说明一步一步地得到了一个正在运行的系统。 So please make sure you read and follow every step, and copy-paste error messages here when they happen.因此,请确保您阅读并遵循每一步,并在错误消息发生时将其复制粘贴到此处。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM