PyCharm cannot find references to the App Engine SDK
PyCharm 2018.1 can no longer resolve modules that reside in the App Engine SDK. Since the App Engine SDK does not reside on the PYTHONPATH such warnings are expected, but this is a gross oversight on the part of JetBrains. Not only is it impossible to configure the PYTHONPATH used by PyCharm for its inspections, configuring Google App Engine via Preferences > Languages & Frameworks > Google App Engine does not intuit that the core App Engine SDK libraries should be appended to the PYTHONPATH. In order to remedy this error, you can symbolically link the core App Engine SDK libraries to your current PYTHONPATH which is configured via Preferences > Project: <project> > Project Interpreter:
$ echo $APP_ENGINE_SDK
/Users/<user>/.local/google-cloud-sdk/platform/google_appengine
$ ln -s $APP_ENGINE_SDK/google/appengine \
~/.virtualenvs/<virtualenv>/lib/python2.7/site-packages/google/appengine
For this example, I am using a virtual environment, but the concept is the same if you are using a system installation of Python.
Please sign in to leave a comment.
PyCHarm supports App Engine via setting the path to the location of dev_appserver.py (lately I've found this in google-cloud-sdk/bin).
Making PyCharm recognize an existing Google App Engine project
https://www.jetbrains.com/help/pycharm/google-app-engine.html#d1323138e113