Running GAE GCS on PyCharm under OS X, runtime error “No module named cloudstorage”

前端 未结 4 2167
轮回少年
轮回少年 2021-02-20 13:11

I am trying to add Google Cloud Storage functionality to a Python GAE app that is already running with significant functionality. I work entirely within PyCharm on my developmen

4条回答
  •  旧巷少年郎
    2021-02-20 13:58

    If the "cloudstorage" directory is at /lib/cloudstorage, then the import statement has to specify "lib":

    import lib.cloudstorage
    

    In my case, it's:

    import lib.cloudstorage as gcs
    

    By the way, the /lib/GoogleAppEngineCloudStorageClient-1.9.5.0-py2.7.egg-info directory does not seem to be needed and can be deleted.

提交回复
热议问题