Skip to content Skip to sidebar Skip to footer

What, Specifically, Is The When Pip Installing Googleappenginecloudstorageclient?

When following the install instructions here, what, specifically, is the in: pip install GoogleAppEngineCloudStorageClient -t

Solution 1:

<your_app_directory> is the path to the folder containing your app.yaml file.

Your YAML file specifies a script file containing your GAE handlers. This script file, YAML file, and dependencies need to be packaged into a folder for upload.

I use this folder structure:

  • app/
    • app.yaml Note: script attribute will point to src.main.application
    • src/
      • __init__.py
      • main.py Contains a variable called application
    • mypackage/
      • __init__.py
      • supermodule.py
      • othermodule.py
    • lib/
      • cloudstorage/
      • otherlib/
      • etc/

To help python find modules in sub-folders, like the usage import cloudstorage as gcs, the following code is useful in your main.py file:

import os
import sys
#sys.path.append(os.path.join(os.path.dirname(__file__), "lib"))
sys.path.append(os.path.join(os.path.join(os.path.dirname(__file__), ".."), "lib"))  # relative to main.py

Solution 2:

I am not sure if this is what did it at the end, but I no longer get the import error after doing:

sys.path.append('/applications/lib')

Post a Comment for "What, Specifically, Is The When Pip Installing Googleappenginecloudstorageclient?"