适用于 Mac OS X 的 PyGTK 在哪里?
是否有适用于当前 mac os x、Python 的 PyGTK 的二进制文件? 我使用多种桌面环境(mac、windows、gnome),并且确实认为 python 缺乏跨平台 GUI 是一个问题。 有谁知道在哪里可以找到适用于 Mac 的 PyGTK 和 GTK 的内置版本? 我无法克隆 git 存储库,它总是超时。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
这里有一个正在测试的 PyGTK 2.24 安装程序, 已在 PyGTK 列表中宣布。
UPDATE 项目已移至 macpkg 的 sourceforge 页面。
我无法让它与 meld (分段错误)一起工作,但示例 PyGTK 程序工作正常。
UPDATE 2 此后,新包 Py3GTK3 出现在同一 sourceforge 页面上。 不过还没有测试过。
There is an installer for PyGTK 2.24 in test here, announced on the PyGTK list.
UPDATE project has moved on macpkg's sourceforge page.
I couldn't make it work with meld (segmentation fault), but sample PyGTK programs work OK.
UPDATE 2 since then a new package Py3GTK3 appeared on the same sourceforge page. Haven't tested though.
sourceforge 上现在有一个 mac 软件包
There is now a mac package on sourceforge
从 http://sourceforge.net/projects/mcpkg/files/PyGTK/< /a> 并安装。
如果你只是想使用系统 python,这就是你所要做的。
如果不是的话,下面是如何用pyenv安装,可以用自制。 安装了brew后,您可以安装版本pyenv和Python 2.7.8:
完成此操作后,您将把gtk包及其依赖项复制到您的python安装中:
就是这样。 您还可以类似地安装 Py3GTK3 软件包,其中包含来自 http://sourceforge 的 python 2.7 和 3.2 软件包.net/projects/mcpkg/files/Py3GTK3/。
Download the latest package from http://sourceforge.net/projects/macpkg/files/PyGTK/ and install.
If you're just trying to use the system python, this is all you'll have to do.
If you're not, the following is how to install it with pyenv, which can be installed with Homebrew. With brew installed, you can install version pyenv and Python 2.7.8 with:
After you've done that, you'll then have copy the gtk package and its dependencies into your python installation:
That's it. You can also similarly install the Py3GTK3 package which has packages for python 2.7 and 3.2 from http://sourceforge.net/projects/macpkg/files/Py3GTK3/.
您是否尝试过使用 macports 来做到这一点? 该网站展示了如何< /a>.
Have you tried doing it using macports? This website shows how.
brew install pygtk
为我工作(需要 homebrew)。已确认也适用于 OS X 10.10,但默认情况下它会将其安装到brew的Python发行版中,因此如果您仍在使用本机python,它将找不到它。
brew install pygtk
worked for me (requires homebrew).Confirmed to work with OS X 10.10 too, but by default it will install it into brew's Python distribution, so if you are still using the native python, it will not find it.
我不使用 macports 但似乎 jhbuild 对我有用。 以下是我已完成的步骤。
https://raw.github.com/jralls/gtk-osx-build/master/gtk-osx-build-setup.sh
并保存到你的主目录。sh gtk-osx-build-setup.sh
~/.local/bin
未添加到您的环境变量中来执行此操作,请编辑位于主目录的.profile
文件和/Users//.local/bin
以你的环境变量。 要了解有关如何编辑此文件的更多信息,请查看:http://www.tech-recipes.com/rx/2621/os_x_change_path_environment_variable/
~/.local/ bin/jhbuild bootstrap 命令。 它将下载并安装一些必要的实用程序。
http://ftp.imendio.com/pub/imendio/gtk-osx/Gtk-Framework-2.14-LATEST.dmg
meta-gtk-osx-python
,您需要构建并安装一些jhbuild
不会自动安装的其他软件包,所以我所做的是安装了libpng
通过执行命令:~/.local/bin/jhbuild build libpng
libtiff
,因此执行命令:~/. local/bin/jhbuild build libtiff
gtk-doc
是必需的,所以:~/.local/bin/jhbuild build gtk-doc
meta-gtk-osx-python
:~/.local/bin/jhbuild build meta-gtk-osx-python
让我知道它是否有效。
I don't use macports but it seems that jhbuild works for me. Below is the steps that I've done.
https://raw.github.com/jralls/gtk-osx-build/master/gtk-osx-build-setup.sh
and save it to your home directory.sh gtk-osx-build-setup.sh
~/.local/bin
isn't added to your environment variable to do this, edit your.profile
file located at your home directory and/Users/<username>/.local/bin
to your environment variable. to know more on how to edit this file check out:http://www.tech-recipes.com/rx/2621/os_x_change_path_environment_variable/
~/.local/bin/jhbuild bootstrap
command. it will download and install some necessary utilities.http://ftp.imendio.com/pub/imendio/gtk-osx/Gtk-Framework-2.14-LATEST.dmg
meta-gtk-osx-python
, you need to build and install some other packages thatjhbuild
doesn't install automatically, so what i did was i installedlibpng
by doing the command:~/.local/bin/jhbuild build libpng
libtiff
so do the command:~/.local/bin/jhbuild build libtiff
gtk-doc
is needed so:~/.local/bin/jhbuild build gtk-doc
meta-gtk-osx-python
by doing a:~/.local/bin/jhbuild build meta-gtk-osx-python
Let me know if it works.