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

1.9k Views Asked by At

I'm working with polygon data in Python and am having trouble importing packages fiona and geopandas. When I run:

import fiona

I receive the following:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_5540\1102285635.py in <module>
----> 1 import fiona

~\anaconda3\lib\site-packages\fiona\__init__.py in <module>
     83 
     84 import fiona._loading
---> 85 with fiona._loading.add_gdal_dll_directories():
     86     from fiona.collection import BytesCollection, Collection
     87     from fiona.drvsupport import supported_drivers

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

I've seen suggestions online that this is the result of incompatibilities between certain versions of packages, but as far as I can tell I've set my packages to the correct versions:

  • fiona: 1.8.22
  • geopandas: 0.9.0
  • Shapely: 1.8.5 (tried 2.0.0 as well)
  • GDAL: 3.4.1
0

There are 0 best solutions below