Importerror:no module named Python_util.util

Source: Internet
Author: User

Studied brother there copy a python file, run error Importerror:no module named Python_util.util,python Small white Internet search, and did not search for valuable answers ... After groping, finally resolved.

In fact, this is the lack of python_util.util, to this URL https://pypi.python.org/pypi/python-util/2.0.0#downloads download, as shown, select the first can be downloaded after the decompression, There's a setup.py inside.

Enter command python setup.py, error:no commands supplied with a gorgeous error. Learn from the blogger's approach http://blog.csdn.net/dxldehuali/article/details/38866669, instead enter the python setup.py install

With the new error, Error:can ' t create or remove files in install directory. Clearly not enough authority. Go to the upper directory and change the permissions of the entire directory by command sudo chmod 777-r python-util-2.0.0. Then go to python-util-2.0.0, locate the setup.py file, and install it via the command sudo python setup.py install.

Confidently rerun, result error No module named Util, Crash!

After the meal came back, calm down to consider, check the use of import in Python, found that the error in the code is from python_util.util import *, the actual should be from python_util import *. Re-run, problem solving ...

Cry...

Importerror:no module named Python_util.util

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.