Dec-21-2018, 12:07 AM
Found the answer:
google-auth does not have a __init__.py in the "google" folder when installed from wheel so python 2.7 cannot import the oauth2 package inside this folder unless:
Because google-auth instead has a .pth file when it gets installed (google_auth-1.6.2-py3.7-nspkg.pth) this only gets executed if your site-packages is in the list of sites. So in order to make it work you have to:
import site
site.addsitedir('/path/to/my/site-packages')
google-auth does not have a __init__.py in the "google" folder when installed from wheel so python 2.7 cannot import the oauth2 package inside this folder unless:
Because google-auth instead has a .pth file when it gets installed (google_auth-1.6.2-py3.7-nspkg.pth) this only gets executed if your site-packages is in the list of sites. So in order to make it work you have to:
import site
site.addsitedir('/path/to/my/site-packages')