ImportError: No module named python_util.util

ImportError: No module named python_util.util 

I copied a python file from my senior brother and ran it and reported the error ImportError: No module named python_util.util. I searched online for Python novices but found no valuable answers. . . After much exploration, I finally solved it.

In fact, this is the lack of python_util.util. Go to this URL https://pypi.python.org/pypi/python-util/2.0.0#downloads to download it. As shown in the picture below, just choose the first one and unzip it after downloading. , there is a setup.py inside

Enter the command python setup.py, and an error message will appear: no commands supplied. Learn from this blogger’s approach http://blog.csdn.net/dxldehuali/article/details/38866669 and enter python setup.py install instead

There is a new error, error: can't create or remove files in install directory. Apparently the permissions are not enough. First enter the upper directory and change the permissions of the entire directory through the command sudo chmod 777 -R python-util-2.0.0. Then enter python

Guess you like

Origin blog.csdn.net/qq_72290695/article/details/134609762