close

How to prevent “ImportError: No module named oauth2client.client” on Google App Engine?

Hello Guys, How are you all? Hope You all Are Fine. Today We Are Going To learn about How to prevent “ImportError: No module named oauth2client.client” on Google App Engine in Python. So Here I am Explain to you all the possible Methods here.

Without wasting your time, Let’s start This Article.

How to prevent “ImportError: No module named oauth2client.client” on Google App Engine?

  1. How to prevent “ImportError: No module named oauth2client.client” on Google App Engine?

    I have this problem and solved by installing oauth2client with pip3:
    pip3 install --upgrade oauth2client

  2. prevent “ImportError: No module named oauth2client.client” on Google App Engine

    I have this problem and solved by installing oauth2client with pip3:
    pip3 install --upgrade oauth2client

Method 1

I have this problem and solved by installing oauth2client with pip3:

pip3 install --upgrade oauth2client 

Method 2

The answer is to “vendor” in the file(s).

  1. Create a new folder called “lib” in the same folder as your app.yaml file. (You can name it something else. Just use that name below.)
  2. Create an empty file called appengine_config.py in the same folder as your app.yaml file
  3. Add two lines to that appengine_config.py file:from google.appengine.ext import vendor vendor.add('lib')
  4. From terminal, navigate to the directory which contains that file and execute the following command:sudo pip install -t lib google-api-python-client

The import error will disappear and you will have all the sub-dependent modules as well.

Summery

It’s all About this issue. Hope all Methods helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which Method worked for you? Thank You.

Also, Read