新人求上岸 发表于 2021-7-26 22:22:15

most likely due to a circular import怎么解决

import easygui as f
choices=["*用户名","*真实姓名","固定电话","*手机号码","QQ","*E-mail"]
user_date=f.multpasswordbox(msg="【*真实姓名】为必填项。\n【*手机号码】为必填项。\n【*E-mail】为必填项。",title="账户中心",fields=choices)




Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
    import easygui as f
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\easygui.py", line 3, in <module>
    user_date=f.multpasswordbox(msg="【*真实姓名】为必填项。\n【*手机号码】为必填项。\n【*E-mail】为必填项。",title="账户中心",fields=choices)
AttributeError: partially initialized module 'easygui' has no attribute 'multpasswordbox' (most likely due to a circular import)

无论怎么导入easygui都会显示上述错误,不导入的话就显示 name 'f' is not defined , 这个怎么解决

suchocolate 发表于 2021-7-27 09:18:36

脚本名不要和导入的模块同名。
页: [1]
查看完整版本: most likely due to a circular import怎么解决