I am developing an app with Angular for Front and Python (webapp2) as a backend all about App Engine.
At this point I need to use Google Oauth2 to request an authorization token.
According to Google's documentation. I have to import the corresponding modules
import google.oauth2.credentials
import google_auth_oauthlib.flow
Before I install them with pip
pip install --upgrade google-api-python-client
pip install --upgrade google-auth google-auth-oauthlib google-auth-httplib2
It is mounted in a virtual environment. After running dev_appserver.py app.yaml everything is fine, but if I update the web it returns me:
Traceback (most recent call last):
File "/usr/lib/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/usr/lib/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "/usr/lib/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 85, in LoadObject
obj = __import__(path[0])
File "/home/nacho/altostratusCS/main.py", line 3, in <module>
import google.oauth2.credentials
File "/usr/lib/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/python/runtime/sandbox.py", line 1149, in load_module
raise ImportError('No module named %s' % fullname)
ImportError: No module named google.oauth2
Why should not the module be recognized if it is already installed with pip?
Thanks in advance