A memorandum memo for yourself.
The target version is as follows
Install the Python plugin in the first place. With this, you can use some functions equivalent to Pycharm.
Specify the path to the Google App Engine SDK installed on your Local machine.
The library installed by Pip should be put in the Lib folder directly under the project because it is a pattern in the official sample, so I think that is good.
Sample in Flask https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/appengine/standard/flask/hello_world
Install with -t
as follows.
pip install -t lib -r requirements.txt
↓ Put the following appengine_config.py file. https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/appengine/standard/flask/hello_world/appengine_config.py
from google.appengine.ext import vendor
# Add any libraries installed in the "lib" folder.
vendor.add('lib')
By the way, only Python can be installed and used with Pip. Others can be used by declaring what Google has prepared in app.yaml.
libraries:
- name: jinja2
version: latest
Below is a list. https://cloud.google.com/appengine/docs/standard/python/tools/built-in-libraries-27
After making the preparations so far, if you select the Lib folder and specify it as Resources, the one installed in the Lib folder will be referenced properly by Intellij.
All dependent libraries are now recognized by Intellij.
If you leave it alone, the Jinja2 template will not be recognized. This is inconvenient, so open the Pythont Template Language from Preferences and configure it.
.. .. I have written so far and feel that it is better to use Pycharm quietly.
Recommended Posts