while importing fiona module getting error

318 views Asked by At

I have already install the Fiona using the command

pip3 install Fiona

Now in my .py file I'm trying to import Fiona using import fiona

it gave me this error:

SBCs-MacBook-Pro:gis-python sbc$ python practice.py 
Traceback (most recent call last):
  File "/Users/sbc/Desktop/project_tudip/upl_tudip/gis-python/practice.py", line 3, in <module>
    import fiona
  File "/Users/sbc/opt/anaconda3/envs/uniweed/lib/python3.9/site-packages/fiona/__init__.py", line 86, in <module>
    from fiona.collection import BytesCollection, Collection
  File "/Users/sbc/opt/anaconda3/envs/uniweed/lib/python3.9/site-packages/fiona/collection.py", line 11, in <module>
    from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
ImportError: dlopen(/Users/sbc/opt/anaconda3/envs/uniweed/lib/python3.9/site-packages/fiona/ogrext.cpython-39-darwin.so, 2): Symbol not found: ____chkstk_darwin
  Referenced from: /Users/sbc/opt/anaconda3/envs/uniweed/lib/python3.9/site-packages/fiona/.dylibs/liblz4.1.9.3.dylib (which was built for Mac OS X 11.0)
  Expected in: /usr/lib/libSystem.B.dylib
in /Users/sbc/opt/anaconda3/envs/uniweed/lib/python3.9/site-packages/fiona/.dylibs/liblz4.1.9.3.dylib

same code is running in my other laptop. but in This I'm not able to run my code. configuration of laptop in which error is coming is macOS High Sierra MacBook Pro (13-inch, Early 2011) Processor 2.3 GHz Intel Core i5 Memory 16 GB 1600 MHz DDR3

In my env. I have GDAL and our are already installed.

1

There are 1 answers

0
Sga On

This error arises because MacOS High Sierra (10.13.6) doesn't have ____chkstk_darwin function.

You can locally force a specific Fiona version with pip, in particular the last one that supports High Sierra:

pip install fiona==1.6.4