I had problems with importing oauth2 package. In in the init.py file there is a problem with this line getting executed, from ._compat import PY3 . I don't know why installing and running oauth2 is such a mess
this worked for me:
from oauth2._compat import PY3
the error you were getting suggests that you were trying to import __main__.compat instead of oauth2._compat
I am getting No module named 'oauth2._compat'