'Issues with Google Earth Engine Python API - "AttributeError: 'module' object has no attribute 'inet_pton'"

I'm trying to use Google Earth Engine via the Python API. I used pip to install (pip install earthengine-api) and when I run pip list earthengine-api shows up.

However, I'm trying to go through the Python Installation Guide and when I tried to run the Initialization sequence:

import ee 
ee.Authenticate()
ee.Initialize()

It works up to a point. I am able to get and enter the verification code, but running the cell fails with the error:

AttributeError: 'module' object has no attribute 'inet_pton'

Does anyone have any idea what is causing this error and how to fix it?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source