[BUG] Can't run on Colab
Something happened that H3 no longer run on Google Colab.
- H3 was running perfectly
- When trying to install now the following error happens:
[/usr/local/lib/python3.10/dist-packages/h3pandas/h3pandas.py](https://localhost:8080/#) in <module>
9 import geopandas as gpd
10
---> 11 from h3 import h3
12 from pandas.core.frame import DataFrame
13 from geopandas.geodataframe import GeoDataFrame
ImportError: cannot import name 'h3' from 'h3' (/usr/local/lib/python3.10/dist-packages/h3/__init__.py)
The H3-py 4.0 beta was finally released (actually as 4.1 to also include those features from the C code) so if you didn't pin to 3.7 in collab you got the major version bump which introduced breaking changes in the API.
You can see if you can roll back to 3.7 temporarily to get working and then see what you need to change to use the new major version.
One quick note is that you don't have to from h3 import h3 you can just import h3 but most of the APIs have changed between these major versions so that by itself won't be enough to upgrade.
Thank you so much for you quick reply and solution. Forcing the version worked for us.