Python Forum

Full Version: Easygui
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi. I need help with easygui. I am frighteningly New at coding. I don’t know how to fix the problem of the error message I receive.

>>> import easygui
>>> easygui.msgbox(“work”)
Error:
Traceback (most recent call last): File “<physhell#2>“, line 1, in <module> easygui.msgbox(“work”) AttributeError: ‘module’ object has no attribute ‘msgbox’
Please help.
by any chance, do you have file named easygui.py in the current working directory?
I Have the file in the folder marked python 25. It’s root folder. And no I don’t understand it myself. I’m literally learning code from a book
but it's a file you created, right?
Also note that python 2.5 is way outdated version of python. Latest python 2 version is 2.7.15.
And as you are new to programming you should start with python3. Python2 official support will end January 1st, 2020.
Yes. As per instructions on google

I will start with python 3 after going through the book. The syntax did not allow me to follow examples in python 3
Your file should not be named easygui.py. You import your own file. Did you download and extract install easygui package?
I extracted it and copied the .py file into the python 25 file. I have tried installing it but with no success. Even tried doing it with command prompt like the internet said but it’s not letting me. I can import the easygui on the IDE but cannot use the functions it’s supposed to provide
1. remove everything you have downloaded
2. use pip install --upgrade easygui. This will install it for python2. See the docs http://easygui.readthedocs.io/en/master/ - How to get easygui.
3. go to your working folder and create py file, e.g. myscript.py
4. Put your code in it and run it from terminal/command prompt with python myscript.py
Thanks. That’s the most info I’ve got all day. I will try it out and will then reply to this if it works or I I’m stuck. Thanks again

Does this mean that I can’t use IDLE anymore
no problem to use IDLE. You can use python prompt or create/open and run a file from IDLE.
However note IDLE is considered very poor IDE
Pages: 1 2