Error when importing geos in MacOSX: libc does not exists
See original GitHub issueNB: the issue have been reported first as a conda-forge issue. The error can be reproduced either on anaconda, conda or pip.
Expected behavior and actual behavior.
from shapely import geos
fail.
The error is:
File "<stdin>", line 1, in <module>
File "/Users/pradal/miniconda3/envs/shapeely/lib/python3.8/site-packages/shapely/geos.py", line 113, in <module>
free = load_dll('c').free
File "/Users/pradal/miniconda3/envs/shapeely/lib/python3.8/site-packages/shapely/geos.py", line 54, in load_dll
raise OSError(
OSError: Could not find lib c or load any of its variants [].
Steps to reproduce the problem.
from shapely import geos
Everything works if I change (in geos.py, line 113)
free = load_dll('c').free
by
free = load_dll('System').free
orfree = load_dll('cxx').free
( or even- `free=CDLL(None).free
See issue 64 on shapely-feedstock.
libc
equivalent of macOS islibSystem
, soload_dll('c')
doesn’t work. This is an issue upstream and not a packaging issue.
Operating system
Mac OS X 10.15.1 No homebrew or macport installed.
Shapely version and provenance
1.7.0
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Error when importing geos in MacOSX: libc does not exists #888
This is an issue upstream and not a packaging issue. Operating system. Mac OS X 10.15.1. No homebrew or macport installed. Shapely version...
Read more >OSError: Could not find lib c or load any of its variants []
Set channel priority to conda-forge; installed geopandas; Tried executing from shapely.geometry import Line however, I still get the same error.
Read more >using a newer libc++ to build software on older macos systems
The current libcxx port has the ability to build a new libc++ (presently ... fstest.cpp:12:32: error: 'path' is unavailable: introduced in macOS 10.15...
Read more >Clang linking error MacOS Big Sur | Apple Developer Forums
I solved this problem by installing the CommandLineTool from Xcode. Before solving this problem, I found that there is no CommandLineTools folder in...
Read more >PyInstaller Documentation - Read the Docs
Open a command prompt/shell window, and navigate to the directory where your .py file is located, then build your app with the following...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@brianckeegan fwiw, I’m not getting the same error on my conda build… Below is my conda info on two machines that are fairly similarly configured, but the first (blanca) is a 10.15 one, while the 2nd (alpamayo) is running 10.16. The only other big difference I spot is that I have conda-forge as my base default. You might check making a fresh environment with conda-forge as its default in case that’s what’s triggering the problem.
Sorry not to be of more help, these things can be really frustrating… When I’m stuck with one of these, my approach is just nuke-and-rebuild, for which I have a script that redoes my conda setup without much manual intervention. Blunt instrument, but gets the job done 😃
OSX 10.15 (Catalina) build:
OSX 10.16 (BigSur) build:
@sgillies: My issue got closed as a duplicate, this issue still exist in
1.7.0
, as I missing something? should it be reopened?