I am working on a project where I need to use the Google Analytics API to extract data into a python notebook.
I installed the googleanalytics library using:
!pip install googleanalytics
and it successfully installed.
Then I tried importing the library using:
import googleanalytics as ga
but it gives me a ModuleNotFound error which shows:
ModuleNotFoundError: No module named 'urlparse'
I then checked which library urlparse belongs to and found that it is a part of urllib3 library. So I tried installing that library but I got a message that it is already installed.
So I separately tried importing urlparse to check if it works using:
from urllib.parse import urlparse
and it works.
In summary, the urlparse module is installed but when I import googleanalytics library, I get an error that says module is not found.
How can that be fixed?