Search code examples
pythongoogle-app-enginepipgoogle-cloud-sdk

google api client python import taskqueue


python version 2.7.9

installed version 1.5.1

pip install --upgrade google-api-python-client

from here trying to import task queue like so

from google.appengine.api import taskqueue

getting

ImportError: No module named google.appengine.api

1.5.1 is the latest version, and I can't seem to find any code reference to task queue in the pip code here


Solution

  • I have downloaded the sdk from here https://cloud.google.com/appengine/downloads

    after downloaded added it to my project source files .

    and added the path to the home directory in my python code like so

    import os, sys
    
    test_directory = os.path.dirname(os.path.abspath(__file__))
    paths = [
        '/../../google_appengine',
    ]
    
    for path in paths:
        sys.path.insert(0, os.path.abspath(test_directory + path))