Python Learning note-import utils error

Source: Internet
Author: User

Today encountered a pit dad problem, find a half-day reason, finally solved, in this specially recorded.

Operating Environment: Windows Eclipse

I configured Python's runtime environment in eclipse to write Python code in eclipse.

Operation Steps:

1. In the Python interactive command line, enter import utils, no error;

2. In Eclipse's Pydev project, enter import utils, error: Unresolved import:utils

Workaround:

1.eclipse, click Window-preferences-pydev-interpreters-jython Interpreter, in libraries, click New Folder, add utils directory "src" Path, click "OK"

2. Restart Eclipse to resolve

Similarly, the following can be resolved:

1. In Project right-click on the Open menu, select properties-> Select "Pydev-interpreter/grammar" click the link "" Click here for configure an interpreter Not listed. "In the" Libraries "tab, click" New Folder ", join the Utils path, click" OK "

2. Restart Eclipse This method can be resolved in Eclipse Pydev, import times wrong: unresolved import

Python Learning note-import utils error

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.