将no-X11 tkinter与python一起使用(通过macports安装)

将no-X11 tkinter与python一起使用(通过macports安装)

问题描述:

我已经安装了Python 2.7和一些有用的库(例如Python图像库) 通过MacPorts.一切都很好.

I have installed Python 2.7 and some useful libraries (like Python Image Library) through MacPorts. Everything is OK.

现在,我想使用Tkinter. 问题在于该版本使用X11(我不想使用X11).

Now, I want to use Tkinter. The problem is that the version uses X11 (and I do not want to use X11).

如果我切换到Apple安装的python(/usr/bin/python而不是 /opt/local/bin/python),Tkinter可以(不需要X11),但是 当然,我错过了通过MacPorts安装的各种库.

If I switch to the python installed by Apple (/usr/bin/python instead of /opt/local/bin/python), Tkinter is OK (no X11 required) but of course, I missed the various libraries installed through MacPorts.

我的问题是:如何在安装了Python 2.7的情况下使用无X11 Tkinter 通过MacPorts"?

My question is : "How could I use the no X11 Tkinter with the Python 2.7 installed through MacPorts" ?

提前谢谢!

这是一个已知问题,您可以检查此页进行搜索 https://www.python.org/download/mac/tcltk

This is a known problem, you can check this page to sove it https://www.python.org/download/mac/tcltk