About 1,980,000 results
Open links in new tab
  1. python - Module 'tkinter' has no attribute 'Tk' - Stack Overflow

    Aug 7, 2019 · Did you name your file "tkinter.py"? This is probably a duplicate of stackoverflow.com/q/46477882/7432

  2. AttributeError module 'tkinter' has no attribute 'Tk' - bobbyhadz

    Apr 8, 2024 · The Python "AttributeError module 'tkinter' has no attribute 'Tk'" occurs when we have a local file named tkinter.py and try to import from the tkinter module. To solve the error, …

  3. [SOLVED] AttributeError: module 'tkinter' has no attribute 'Tk'

    Dec 21, 2018 · The problem can be that your file is named tkinter.py. Doing that shadows the module you need to import, and you get nothing.

  4. 已解决AttributeError: module ‘tkinter‘ has no attribute ‘TK

    Mar 18, 2023 · 如果你在使用 Tkinter 时遇到了` AttributeError: module ' tkinter ' has no attribute ' TK '`的错误,这可能是因为你的 Python 环境中没有正确安装 Tkinter 模块。

  5. Unable to invoke TK () after importing tkinter - Python Help ...

    Jan 31, 2023 · As suggested in the error message, try Tk instead of TK. That’s uppercase T lowercase k; no uppercase K. Thanks. That’s a silly mistake, sorry to ask the question. code. …

  6. AttributeError: partially initialized module 'tkinter' has no attribute ...

    Jan 14, 2022 · Python is trying to read that file however your file is likely also called "tkinter.py" which doesn't have the required code. You should try renaming your document and moving it …

  7. AttributeError: '' object has no attribute 'tk' - Python Forum

    Oct 29, 2020 · Altought I know the basics to create window, I have still trouble when there is class involved, like in this case. I'm not sure where the geometry should be inside the class, before …

  8. Tkinter模块出现AttributeError: module 'tkinter' has no attribute 'Tk

    May 31, 2025 · 在使用Tkinter开发GUI程序时,有时会遇到`AttributeError: module 'tkinter' has no attribute 'Tk'`的错误。 这通常是因为以下原因之一:1) 模块名称大小写错误,Python …

  9. 解决 `AttributeError: module 'tkinter' has no attribute 'TK'` 错误

    Jan 17, 2024 · 本文将介绍如何解决在Python中使用tkinter模块时遇到的 `AttributeError: module 'tkinter' has no attribute 'TK'` 错误。

  10. AttributeError: module 'tkinter' has no attribute 'tk'

    Nov 8, 2016 · If you have named your python file name as tkinter.py or Tkinter.py, change the file name to something else, it will get rid of the attribute error