关于name ‘easygui’is not defined的问题
import urllib.request as urimport urllib.parse as up
import re
import easygui as e
import socket
from bs4 import BeautifulSoup
如上,已经安装好了easygui模块,但是import引用的时候会提示easygui没有定义,请问这个怎么处理?
另外我用pip,easy_install和从官网下载的方法各装了一次easygui会不会有什么影响? 这个问题好 碰碰运气,看看今天有没有大神知道怎么办。 下个升级完整安装包就行!我看到谷歌上老外也在做这个提问,老外最后的解决方案就是给这个安装包升级。完整的升级包再按照甲鱼老师给的方法解决就非常容易了。
https://sourceforge.net/projects/easygui/?source=typ_redirect
我也出现这个问题 搞了 怎么解决这个问题?:??? 这么 解决的啊?我搞了 半天没弄好。Visual Studio Code ,Python 3.10 (32-bit)里面效果一样。
python.exe setup.py install
orpip install easygui
or python.exe -m pip install --upgrade pipand \ pip install pygame
or pip install --user easygui
结局一样!
除了IDLE (Python 3.10 32-bit)可以外:
Python 3.10.1 (tags/v3.10.1:2cd268a, Dec6 2021, 18:54:59) on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import easygui
>>> easygui.msgbox('我是你爸爸 !')
'OK'
>>>
Python 3.10.1 (tags/v3.10.1:2cd268a, Dec6 2021, 18:54:59) on win32
Type "help", "copyright", "credits" or "license()" for more information.
====================== RESTART: E:/156u4/new proj/temp3.py =====================
Traceback (most recent call last):
File "E:/156u4/new proj/temp3.py", line 1, in <module>
import easygui
File "E:\156u4/new proj\easygui\__init__.py", line 3, in <module>
__all__ = easygui.__all__
NameError: name 'easygui' is not defined
页:
[1]