【问题标题】:ImportError: No module named cloudstorage in GAEImportError:GAE 中没有名为 cloudstorage 的模块
【发布时间】:2019-04-05 18:27:44
【问题描述】:

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

【问题讨论】:

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


    【解决方案1】:

    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

    【讨论】:

    • 我收到错误:ImportError: No module named setuptools
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-03-28
    • 2017-12-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-06
    • 2018-11-11
    相关资源
    最近更新 更多