2

Links where I found solutions but don't understand:

1. Summarize the problem
Want to study python with my son, we have book called Hello World Computer Programming for kids and other beginners. In chapter 6 we move toward create message boxes, button boxes, and choice boxes which will need to build our private app together.

2. Describe what you’ve tried
I looked at previous questions and learned that in order to import the module, I would have to first move the easygui.py file into my google drive. Then I learn to use [!pip install easygui] to install the module, which also worked. I was able to import the module without any problem but once the system reads the line of code to create the msg box it crashes and returns the message.

TclError: no display name and no $DISPLAY environment variable

I am completely clueless. I saw two similar situations but I'm new and I'm not sure how they solved this problem, they only listed that they used:

Your problem might be solved if you run before:

%matplotlib inline

My question is how and where did they do this because when i place this code before my only two lines a code i still get an error.

3. When appropriate, show some code

!pip install easygui
import easygui
easygui.msgbox("Hello There!")

and also with

%matplotlib inline
import easygui
easygui.msgbox("Hello There!")

image of code and error

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

1 Answers1

1

easygui runs on local machine. So it's working when you write your lines in an editor, for example Python IDE or Sublime Text etc.

google-colab is an online platform, which is different from local (machine) environment. That's why on colab, it doesn't perform the pop-up.

Mark K
  • 8,767
  • 14
  • 58
  • 118