Bemmu
Bemmu

Reputation: 18217

Pip packages and App Engine

I develop on Google App Engine, which means that I have a deploy command (appcfg.py update) which just uploads a copy of the whole directory to App Engine and runs it there.

I see that a lot of online tutorials when discussing a library suggest to install it as "pip install something". In this case the library ends up somewhere in site-packages.

This wouldn't work for me, because App Engine would not be able to find those modules that are in site-packages on my local machine.

So to be able to use these packages, I find where pip put the library, then copy the whole subdirectory of the module to be under my app engine project and deploy that.

It feels dirty. What's the right approach?

Upvotes: 1

Views: 145

Answers (1)

snakecharmerb
snakecharmerb

Reputation: 55698

This is known as vendoring: Google's docs on this are here.

The documentation explains how install packages into a folder in an App Engine application using pip's --target argument, and how to configure App Engine to add these packages to its path.

Upvotes: 3

Related Questions