ImportError: No module named google.oauth2

5,265 views
Skip to first unread message

zi yang

unread,
Dec 29, 2018, 12:34:29 PM12/29/18
to Google App Engine
I use the    dev_appserver.py to start my project, but it gives me this error:

            ImportError: No module named google.oauth2      

But I have installed those modules:

微信图片_20181228215104.png

           

George (Cloud Platform Support)

unread,
Jan 3, 2019, 2:27:24 PM1/3/19
to Google App Engine
It looks like a library duplication issue. How did you install libraries? How did you install Cloud SDK? 

As a preemptive measure, you may consider uninstalling all Google packages from your local machine, then delete the lib folder in your GAE app folder, and re-create it. This being done, you should run:

pip install -t lib google-auth google-auth-httplib2 google-api-python-client --upgrade 

Does this address your problem? 

You may consider reinstalling google-compute-engine (note the dashes, not underscores) using yum or pip. This step has proven successful in a series of similar situations. 

To enable a closer examination of your installation it may be advisable to run the following commands: 

gcloud components update

gcloud info

What is the output from these commands?
Reply all
Reply to author
Forward
0 new messages