Google App Engine Python ImportError Module Not Found
I'm using Pydev 1.5.9 and the latest version of google app engine, developing in eclipse 3.6
I've set up my environment, and I have my base code executing fine.
Now I'm trying 开发者_StackOverflowto import the simplejson library using import simplejson
I've tried
- adding the simplejson folder to a "pydev source folder" within eclipse
- tried adding simplejson folder as an external library
- tried adding simplejson in PYTHONPATH
I am still encountering an error when I attempt to run using SDK dev server. ' import simplejson
ImportError: No module named simplejson'What is the best way to import external libraries into a Python App Engine project using Eclipse and Pydev?
Don't know if this will help with the Google App Engine, and may be too late, but the breadcrumb trail might help someone.
I had a similar problem in pydev and the solution was quite simple. Here is the pydev doc which talks about the subject of imports and configuring the interpreter in pydev.
The bit that I had missed, and caused a few hours of frustration, was that I had to press the Apply button in the Window > Preferences > PyDev > Interpreter - Python. This causes pydev to rebuild its internal indices and if you have added the libary into your PYTHONPATH somewhere (I just dropped it into the python/Lib folder) it should resolve your import problem - it did mine in any case.
Make sure you have automatic builds switched on for your project or rebuild your project if not.
HTH
精彩评论