Google Cloud Client for Cloud Storage with App Engine Standard (Python 2.7)

79 Views Asked by At

I'm trying to use Google Cloud Storage with App Engine Standard (Python 2.7).

I've been trying to follow the simple 4-step installation instructions here: https://cloud.google.com/appengine/docs/legacy/standard/python/migrate-to-python3/migrate-to-storage-apis#install

After following the instructions, when trying to run, I get a message "ImportError: No module named pkg_resources" caused by the import pkg_resources at the top of appengine_config.py. I don't understand how this is supposed to work, since the vendor.add call comes later in the file, so the pkg_resources installed in lib is not yet available. If pkg_resources is supposed to be present elsewhere, where? Somewhere in the app engine installation? How would it get there?

I do already have other third-party libraries installed and working in lib, so that part of the configuration is probably ok. That being said, these instructions do install A LOT of libraries into this app-specific lib folder, which I'd love to avoid if possible.

Anyway, I can work around this pkg_resources problem by importing pkg_resources after the vendor.add call (but it leaves me concerned that the instructions aren't working).

With the workaround, I then get "ImportError: No module named moves" from file C:\Python27\lib\site-packages\google\cloud_helpers.py, line 29, in 'from six.moves import http_client`. There is no "six" folder in "lib", only "six.py".

I feel as if I may be missing something, since the original instructions are so simple, yet not working for me. Can anyone help?

0

There are 0 best solutions below