将no-X11 tkinter与python一起使用(通过macports安装) [英] Use no-X11 tkinter with python (installed through macports)

查看:81
本文介绍了将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

这篇关于将no-X11 tkinter与python一起使用(通过macports安装)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆