gee-community/geemap

No module named 'geojson'

hfchen20 opened this issue · 1 comments

Run on colab. After updating to geemap-0.20.5-py2.py3-none-any.whl, this error appeared. Could you please confirm if this is related to the fresh changes with required libraries?

landcover_google_sample.csv

label_points = pd.read_csv(sample_csv)
LABEL_DATA = geemap.df_to_ee(label_points, 
                              latitude=label_points.columns[1], 
                              longitude=label_points.columns[0])

[/usr/local/lib/python3.9/dist-packages/geemap/common.py](https://localhost:8080/#) in df_to_geojson(df, out_geojson, latitude, longitude, encoding)
   1161     """
   1162 
-> 1163     from geojson import Feature, FeatureCollection, Point
   1164 
   1165     if out_geojson is not None:

ModuleNotFoundError: No module named 'geojson'
giswqs commented

Yes, geojson is now an optional dependency. You can use pip install geemap[extra] or pip install geojson. We reduced the number of required dependencies to see if geemap can potentially be accepted by the Google Colab team. If it is off the table, we might move some optional dependencies back to required.