Google App Engine “no module named requests” PyDev

2019-02-23 17:49发布

I downloaded and installed requests library for Python 2.7. Using the shell I can make "import requests" and actually use it without problems.

Thing is that when running Google App Engine it can't find it and prompts the error:

ImportError: No module named requests

I'm using PyDev-Eclipse as IDE for my project and tried adding the path (/usr/local/lib/python2.7/dist-packages/requests) both in

Project > properties > PyDev - PYTHONPATH > External Libraries

and in

Window > preferences > Pydev -Interpreter > Libraries

and none worked! Still having the same issue when trying to run my GAE app

Anyone could help?

Thanks!

1条回答
我命由我不由天
2楼-- · 2019-02-23 18:25

Any 3rd party lib you use must be physically included in your project and deployed to appengine. This means it is not sufficient to just install with easy_install or pip

See the docs https://developers.google.com/appengine/docs/python/runtime#Pure_Python

查看更多
登录 后发表回答