clematologie
clematologie

Reputation: 187

Error when importing geopandas OSError: Could not find lib c or load any of its variants []

I'm using Spyder with Anaconda and since MacOS last update (Big Sur 11.0.1), when doing import geopandas, I get the following error:

OSError: Could not find lib c or load any of its variants [].

There are several subjects on the matter (particularly this one and this one), that mainly recommends to reset the environment variable DYLD_FALLBACK_LIBRARY_PATH by putting in the Terminal:

export DYLD_FALLBACK_LIBRARY_PATH=$(HOME)/lib:/usr/local/lib:/lib:/usr/lib

However, here is what I get:

-bash: HOME: command not found

A brew or pip install didn't fix the problem either.

Does anyone have an idea on how I can fix this? Am I suppose to replace $(HOME) by something?

Many thanks!

Upvotes: 7

Views: 6663

Answers (3)

clematologie
clematologie

Reputation: 187

For references: I ended up reinstalling a new environment on Anaconda an it works but I wasn't able to fix the original problem.

Upvotes: 0

I had the same issue. To fix the problem, use:

Change the Shapely package

https://github.com/Toblerity/Shapely/commit/a34ec59a7dc9089a71968c6871e29addd872ea3b

And then reinstall Xcode:

xcode-select --install

The geos.py file and line number you need to modify will be in the log output that generated the OSError. Just look a few lines up.

Upvotes: 4

Kyle Barron
Kyle Barron

Reputation: 2659

I had the same error and fixed it just by reinstalling Shapely:

pip install --upgrade --force-reinstall shapely

Upvotes: 25

Related Questions