Today, I encountered a problem with Keng father. I searched for the reason for it for a long time and finally solved it. I specially record it here
Running environment: Windows eclipse
I configured the running environment of Python in eclipse and wrote Python code in eclipse
Operation steps:
1. On the python interactive command line, enter import utils without error
2. In the pydev project of eclipse, enter import utils, and the error is: unresolved import: utils
Solution:
1. In eclipse, click window preferences pydev interpreters Jython Interpreter, in libraries, click new folder and add the path – > Click “OK”
2. Restart eclipse to solve the problem
Similarly, it can be solved as follows:
1. Right click project to open the menu – > Select properties – > Select “pydev interpreter/grammar” – > Click the link “click here to configure an interpreter not listed.” – > In the “libraries” tab, click “new folder” to add the path of utils – > Click “OK”
2. Restart eclipse
In this way, you can solve the problem of “unresolved import” in eclipse pydev