How to install GUI

In the process of installing easygui in python, the download is 0.97. When installing, it prompts that the setuptools module does not exist. Then go to install setuptools and so on, which is really troublesome. It didn't work either. Later downloaded 0.96. to succeed. Below are the steps.

1. Download easygui 0.96. https://sourceforge.net/projects/easygui/files/0.96

2. After decompression, two more files are setup.py and easygui.py.

4. Create a new easygui folder under the python/Lib/site-packages folder.

3. Put the easygui.py file into the easygui folder.

4. Configure environment variables.

My Computer--Properties--Advanced System Settings--Advanced--Environment Variables--Create a new system variable

variable named PYTHONPATH

The variable value is python/Lib/site-packages/easygui

5. Open IDLE and introduce easygui.

import easygui

6. Write the test code.

easygui.msgbox('Hello World')

7. A message box pops up. success!

 

If there is an error, see this step:

Error content:

>>>import easygui

>>>easygui.msgbox("Hello There!")

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

AttributeError: 'module' object has no attribute 'msgbox'

 

The workaround is as follows:

#1. Delete the files you just dragged in (such as easygui.py)

#2. Enter pip uninstall easygui in the CMD command window to uninstall easygui

#3. Enter pip install easygui in the CMD command window to install easygui

#4. Well, then it’s good

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326561556&siteId=291194637