1

我在 Google Cloud 上运行我的应用程序并希望使用 Google Cloud Storage,但即使我的应用程序在 Cloud 上运行,也会出现导入错误。

4

1 回答 1

2

蟒蛇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')

蟒蛇 3:

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

于 2019-04-05T19:20:15.143 回答