1. 程式人生 > >python--DenyHttp項目(1)--GUI:tkinter? module 'tkinter' has no attribute 'messagebox'

python--DenyHttp項目(1)--GUI:tkinter? module 'tkinter' has no attribute 'messagebox'

找到 題解 嘗試 問題解決 erro 解決問題 deny att message

AttributeError: module ‘tkinter‘ has no attribute ‘messagebox‘

improt tkinter

from tkinter import *

import tkinter as tk

以上三種嘗試之後,都沒有解決問題,最後查找了python安裝目錄的tkinter模塊,確實找到了messagebox.py

於是:

from tkinter import messageox

問題解決

python--DenyHttp項目(1)--GUI:tkinter? module 'tkinter' has no attribute 'messagebox'