Use with app engine
Answered
App engine requires us to "vendor" all of our Python dependencies.
This allows all needed packages to get uploaded as part of our deploy step.
we have a "lib/" directory at the root of our project to hold these dependencies
Questions:
How do I force PyCharm to ONLY validate imports (or requirements.txt) against this directory
How do I force PyCharm to ONLY install new packages into this lib/ directory
I'm not too familiar with PyCharm so please be as precise as possible
Please sign in to leave a comment.
Hi!
> How do I force PyCharm to ONLY validate imports (or requirements.txt) against this directory
You can select interpreter that doesn't have this packages installed (for example, create new virtual env) and mark lib folder as source root (right click on directory in project view -> mark directory as -> source root).
> How do I force PyCharm to ONLY install new packages into this lib/ directory
Unfortunately, we don't automatically install packages to lib folder when using app engine, but you can specify -t <path to your lib dir> option when installing package using PyCharm's package manager (see screenshot). Go to Settings (Preferences if on Mac) -> Project -> Project Interpreter -> + to install a new package