easygui模块总是出问题
import easygui as gimport sys
while 1:
g.msgbox('嗨,欢迎进入第一个界面小游戏^_^')
msg = '请问你希望在鱼c工作室学习到什么知识呢?'
title = '小游戏互动'
choices = ["谈恋爱","编程","ooxx","琴棋书画"]
choice = g.choicebox(msg,title,choices)
g.msgbox('你的选择是:' + str(choice),'结果')
msg = '你希望重新开始小游戏吗?'
title = '请选择'
if g.ccbox(msg,title):
pass
else:
sys.exit(0)
Traceback (most recent call last):
File "D:\系统\练习\作业.py", line 11, in <module>
choice = g.choicebox(msg,title,choices)
File "D:\Python\lib\site-packages\easygui\boxes\choice_box.py", line 38, in choicebox
mb = ChoiceBox(msg, title, choices, preselect=preselect,
File "D:\Python\lib\site-packages\easygui\boxes\choice_box.py", line 123, in __init__
preselect_list = make_list_or_none(preselect, cast_type=int)
File "D:\Python\lib\site-packages\easygui\boxes\choice_box.py", line 95, in make_list_or_none
if not isinstance(obj, collections.Sequence):
AttributeError: module 'collections' has no attribute 'Sequence'
为什么我安装的easygui模块运行的时候会出现这个,是我代码的问题还是安装的问题?我找了好多方法都不行 这是 python 的版本问题,你可以看一下这个帖子:
https://fishc.com.cn/forum.php?mod=redirect&goto=findpost&ptid=209134&pid=5739456 这个模块应该是python中最扯的一个了,简单了解一下略过即可
页:
[1]