Partially initialized module 'rasterio' has no attribute '_loading' (most likely due to a circular import)

Viewed 41

I am using the following commands to import "rasterio" into the Jupiter notebook.

import rasterio
from rasterio.plot import show as rioshow

I get the following error:


AttributeError                            Traceback (most recent call last)
Input In [39], in <cell line: 35>()
     31 from mpl_toolkits.axes_grid1 import make_axes_locatable
     33 #import contextily as ctx
     34 #import geopandas
---> 35 import rasterio
     36 from rasterio.plot import show as rioshow
     37 # from obspy.imaging.beachball import beachball
     38 # from obspy.imaging.beachball import beach

File ~\anaconda3\lib\site-packages\rasterio\__init__.py:44, in <module>
     41 import warnings
     43 import rasterio._loading
---> 44 with rasterio._loading.add_gdal_dll_directories():
     45     from rasterio._show_versions import show_versions
     46     from rasterio._version import gdal_version, get_geos_version, get_proj_version

Error message: AttributeError: partially initialized module 'rasterio' has no attribute '_loading' (most likely due to a circular import)

0 Answers
Related