![](/img/trans.png)
[英]Mac OS X: _tkinter.TclError: no display name and no $DISPLAY environment variable
[英]Mac OS X Python tkinter.TclError with Popup Menu
我正在嘗試在Mac OS X上使用tkinter python GUI工具箱調用彈出菜單。這在Windows上可以正常運行,但在Mac OS X上會拋出此TclError。我在計算機上安裝了ActiveTcl 8.6。 所有其他GUI元素(到目前為止)都運行良好。 你們對解決這個問題有任何想法嗎? 追溯如下。
Exception in Tkinter callback
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/__init__.py", line 1487, in __call__
return self.func(*args)
File "gui.py", line 57, in popup
self.menu.post(event.x_root, event.y_root)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/__init__.py", line 2778, in post
self.tk.call(self._w, 'post', x, y)
_tkinter.TclError
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.