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

improt tkinter

from tkinter import *

import tkinter as tk

以上三种尝试之后,都没有解决问题,最后查找了python安装目录的tkinter模块,确实找到了messagebox.py

于是:

from tkinter import messagebox

问题解决

相关文章:

  • 2021-12-24
  • 2021-10-07
  • 2021-12-31
  • 2021-09-19
  • 2021-10-20
  • 2021-08-23
  • 2021-05-23
  • 2021-09-28
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案