鱼C论坛

 找回密码
 立即注册
查看: 1622|回复: 6

[已解决]import easygui报错

[复制链接]
发表于 2022-7-8 11:06:14 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
明明安装成功了easygui,却显示错误
  1. Traceback (most recent call last):
  2.   File "/var/mobile/Containers/Data/Application/9B607A70-23A8-438D-89E0-D27C009580B3/Documents/third_packages/easygui-0.98.3-py3.7.egg/easygui/boxes/utils.py", line 29, in <module>
  3.     import tkinter as tk  # python3
  4.   File "./lib/python3.7/tkinter/__init__.py", line 36, in <module>
  5. ModuleNotFoundError: No module named '_tkinter'

  6. During handling of the above exception, another exception occurred:

  7. Traceback (most recent call last):
  8.   File "/var/mobile/Containers/Data/Application/9B607A70-23A8-438D-89E0-D27C009580B3/Documents/third_packages/easygui-0.98.3-py3.7.egg/easygui/boxes/utils.py", line 36, in <module>
  9.     import Tkinter as tk  # python2
  10. ModuleNotFoundError: No module named 'Tkinter'

  11. During handling of the above exception, another exception occurred:

  12. Traceback (most recent call last):
  13.   File "/var/mobile/Containers/Data/Application/9B607A70-23A8-438D-89E0-D27C009580B3/Documents/third_packages/easygui-0.98.3-py3.7.egg/easygui/boxes/button_box.py", line 15, in <module>
  14.     from . import utils as ut
  15.   File "/var/mobile/Containers/Data/Application/9B607A70-23A8-438D-89E0-D27C009580B3/Documents/third_packages/easygui-0.98.3-py3.7.egg/easygui/boxes/utils.py", line 43, in <module>
  16.     raise ImportError("Unable to find tkinter package.")
  17. ImportError: Unable to find tkinter package.

  18. During handling of the above exception, another exception occurred:

  19. Traceback (most recent call last):
  20.   File "/var/mobile/Containers/Data/Application/9B607A70-23A8-438D-89E0-D27C009580B3/Documents/a.py", line 1, in <module>
  21.     import easygui
  22.   File "/var/mobile/Containers/Data/Application/9B607A70-23A8-438D-89E0-D27C009580B3/Documents/third_packages/easygui-0.98.3-py3.7.egg/easygui/__init__.py", line 34, in <module>
  23.     from .boxes.button_box import buttonbox
  24.   File "/var/mobile/Containers/Data/Application/9B607A70-23A8-438D-89E0-D27C009580B3/Documents/third_packages/easygui-0.98.3-py3.7.egg/easygui/boxes/button_box.py", line 18, in <module>
  25.     import global_state
  26. ModuleNotFoundError: No module named 'global_state'
  27. Traceback (most recent call last):
  28.   File "/var/mobile/Containers/Data/Application/9B607A70-23A8-438D-89E0-D27C009580B3/Documents/third_packages/easygui-0.98.3-py3.7.egg/easygui/boxes/utils.py", line 29, in <module>
  29.     import tkinter as tk  # python3
  30.   File "./lib/python3.7/tkinter/__init__.py", line 36, in <module>
  31. ModuleNotFoundError: No module named '_tkinter'

  32. During handling of the above exception, another exception occurred:

  33. Traceback (most recent call last):
  34.   File "/var/mobile/Containers/Data/Application/9B607A70-23A8-438D-89E0-D27C009580B3/Documents/third_packages/easygui-0.98.3-py3.7.egg/easygui/boxes/utils.py", line 36, in <module>
  35.     import Tkinter as tk  # python2
  36. ModuleNotFoundError: No module named 'Tkinter'

  37. During handling of the above exception, another exception occurred:

  38. Traceback (most recent call last):
  39.   File "/var/mobile/Containers/Data/Application/9B607A70-23A8-438D-89E0-D27C009580B3/Documents/third_packages/easygui-0.98.3-py3.7.egg/easygui/boxes/button_box.py", line 15, in <module>
  40.     from . import utils as ut
  41.   File "/var/mobile/Containers/Data/Application/9B607A70-23A8-438D-89E0-D27C009580B3/Documents/third_packages/easygui-0.98.3-py3.7.egg/easygui/boxes/utils.py", line 43, in <module>
  42.     raise ImportError("Unable to find tkinter package.")
  43. ImportError: Unable to find tkinter package.

  44. During handling of the above exception, another exception occurred:

  45. Traceback (most recent call last):
  46.   File "/var/mobile/Containers/Data/Application/9B607A70-23A8-438D-89E0-D27C009580B3/Documents/a.py", line 1, in <module>
  47.     import easygui
  48.   File "/var/mobile/Containers/Data/Application/9B607A70-23A8-438D-89E0-D27C009580B3/Documents/third_packages/easygui-0.98.3-py3.7.egg/easygui/__init__.py", line 34, in <module>
  49.     from .boxes.button_box import buttonbox
  50.   File "/var/mobile/Containers/Data/Application/9B607A70-23A8-438D-89E0-D27C009580B3/Documents/third_packages/easygui-0.98.3-py3.7.egg/easygui/boxes/button_box.py", line 18, in <module>
  51.     import global_state
  52. ModuleNotFoundError: No module named 'global_state'
  53. Traceback (most recent call last):
  54.   File "/var/mobile/Containers/Data/Application/9B607A70-23A8-438D-89E0-D27C009580B3/Documents/third_packages/easygui-0.98.3-py3.7.egg/easygui/boxes/utils.py", line 29, in <module>
  55.     import tkinter as tk  # python3
  56.   File "./lib/python3.7/tkinter/__init__.py", line 36, in <module>
  57. ModuleNotFoundError: No module named '_tkinter'

  58. During handling of the above exception, another exception occurred:

  59. Traceback (most recent call last):
  60.   File "/var/mobile/Containers/Data/Application/9B607A70-23A8-438D-89E0-D27C009580B3/Documents/third_packages/easygui-0.98.3-py3.7.egg/easygui/boxes/utils.py", line 36, in <module>
  61.     import Tkinter as tk  # python2
  62. ModuleNotFoundError: No module named 'Tkinter'

  63. During handling of the above exception, another exception occurred:

  64. Traceback (most recent call last):
  65.   File "/var/mobile/Containers/Data/Application/9B607A70-23A8-438D-89E0-D27C009580B3/Documents/third_packages/easygui-0.98.3-py3.7.egg/easygui/boxes/button_box.py", line 15, in <module>
  66.     from . import utils as ut
  67.   File "/var/mobile/Containers/Data/Application/9B607A70-23A8-438D-89E0-D27C009580B3/Documents/third_packages/easygui-0.98.3-py3.7.egg/easygui/boxes/utils.py", line 43, in <module>
  68.     raise ImportError("Unable to find tkinter package.")
  69. ImportError: Unable to find tkinter package.

  70. During handling of the above exception, another exception occurred:

  71. Traceback (most recent call last):
  72.   File "/var/mobile/Containers/Data/Application/9B607A70-23A8-438D-89E0-D27C009580B3/Documents/a.py", line 1, in <module>
  73.     import easygui
  74.   File "/var/mobile/Containers/Data/Application/9B607A70-23A8-438D-89E0-D27C009580B3/Documents/third_packages/easygui-0.98.3-py3.7.egg/easygui/__init__.py", line 34, in <module>
  75.     from .boxes.button_box import buttonbox
  76.   File "/var/mobile/Containers/Data/Application/9B607A70-23A8-438D-89E0-D27C009580B3/Documents/third_packages/easygui-0.98.3-py3.7.egg/easygui/boxes/button_box.py", line 18, in <module>
  77.     import global_state
  78. ModuleNotFoundError: No module named 'global_state'
复制代码
最佳答案
2022-7-8 11:57:28
咸苹果 发表于 2022-7-8 11:56
不过手机也有同样的错误

easygui是基于tkinter的,而tkinter只有电脑端有
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2022-7-8 11:07:19 | 显示全部楼层
我是使用app store上的Python3AI软件安装的
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-7-8 11:37:45 | 显示全部楼层
咸苹果 发表于 2022-7-8 11:07
我是使用app store上的Python3AI软件安装的

手机编程?
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2022-7-8 11:55:40 | 显示全部楼层

iPad编程
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2022-7-8 11:56:11 | 显示全部楼层

不过手机也有同样的错误
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-7-8 11:57:28 | 显示全部楼层    本楼为最佳答案   
咸苹果 发表于 2022-7-8 11:56
不过手机也有同样的错误

easygui是基于tkinter的,而tkinter只有电脑端有
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2022-7-8 11:58:21 | 显示全部楼层
临时号 发表于 2022-7-8 11:57
easygui是基于tkinter的,而tkinter只有电脑端有

谢谢
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-4-28 02:58

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表