ImportError:GAE中没有名为cloudstorage的模块

时间:2019-04-05 18:27:45

标签: google-app-engine google-cloud-storage

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

1 个答案:

答案 0 :(得分:2)

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