I want to install Earth Engine API on Python on Ubuntu 18.04. I have both Python 2.7 and Python 3.6 installed on my system, and I install Earth Engine using both pip and pip3 as instructed (installing google-api-python-client, oauth2client, and earthengine-api) without any problem. But I get errors on both 2.7 and 3.6:
On Python 2.7, "import ee" works but "ee.Initialize()" returns this:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Initialize'
On Python 3.6, "import ee" doesn't work and return this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/sshahhey/.local/lib/python3.6/site-packages/ee/__init__.py", line 1, in <module>
from .main import main
File "/home/sshahhey/.local/lib/python3.6/site-packages/ee/main.py", line 10, in <module>
import StringIO
ModuleNotFoundError: No module named 'StringIO'
Any help? I am particularly interested in solving the problem for Python 3.