ImportError: нет модуля с именем cloudtorage в GAE - PullRequest
1 голос
/ 05 апреля 2019

Я запускаю свое приложение в Google Cloud и хочу использовать Google Cloud Storage, но получаю ошибку импорта, даже если мое приложение работает в облаке.

1 Ответ

2 голосов
/ 05 апреля 2019

Python 2:

Вы загрузили его в папку lib? https://cloud.google.com/appengine/docs/standard/python/googlecloudstorageclient/setting-up-cloud-storage#downloading_the_client_library

pip install GoogleAppEngineCloudStorageClient -t <your_app_directory/lib>

Вы продаете в этой папке lib?

https://cloud.google.com/appengine/docs/standard/python/tools/using-libraries-python-27#copying_a_third-party_library

# appengine_config.py
from google.appengine.ext import vendor

# Add any libraries install in the "lib" folder.
vendor.add('lib')

Python 3:

https://cloud.google.com/appengine/docs/standard/python3/using-cloud-storage

...