Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find lib geos_c.dll or load any of its variants [] when trying to import uncertainty_toolbox (shapely issue) #59

Open
sgbaird opened this issue Jan 14, 2022 · 0 comments

Comments

@sgbaird
Copy link
Contributor

sgbaird commented Jan 14, 2022

After running:

pip install git+https://github.com/uncertainty-toolbox/uncertainty-toolbox

on Windows 10, VS Code, inside of conda environment, I get:

Could not find lib geos_c.dll or load any of its variants [].
  File "C:\Users\sterg\miniconda3\envs\vickers-hardness\Lib\site-packages\shapely\geos.py", line 54, in load_dll
    raise OSError(
  File "C:\Users\sterg\miniconda3\envs\vickers-hardness\Lib\site-packages\shapely\geos.py", line 178, in <module>
    _lgeos = load_dll("geos_c.dll")
  File "C:\Users\sterg\miniconda3\envs\vickers-hardness\Lib\site-packages\shapely\coords.py", line 10, in <module>
    from shapely.geos import lgeos
  File "C:\Users\sterg\miniconda3\envs\vickers-hardness\Lib\site-packages\shapely\geometry\base.py", line 20, in <module>
    from shapely.coords import CoordinateSequence
  File "C:\Users\sterg\miniconda3\envs\vickers-hardness\Lib\site-packages\shapely\geometry\__init__.py", line 4, in <module>
    from .base import CAP_STYLE, JOIN_STYLE
  File "C:\Users\sterg\miniconda3\envs\vickers-hardness\Lib\site-packages\uncertainty_toolbox\metrics_calibration.py", line 10, in <module>
    from shapely.geometry import Polygon, LineString
  File "C:\Users\sterg\miniconda3\envs\vickers-hardness\Lib\site-packages\uncertainty_toolbox\metrics.py", line 9, in <module>
    from uncertainty_toolbox.metrics_calibration import (
  File "C:\Users\sterg\miniconda3\envs\vickers-hardness\Lib\site-packages\uncertainty_toolbox\__init__.py", line 9, in <module>
    from .metrics import (
  File "C:\Users\sterg\Documents\GitHub\sparks-baird\VickersHardnessPrediction\hv_prediction.py", line 21, in <module>
    import uncertainty_toolbox as uct

By installing shapely from conda (https://stackoverflow.com/questions/56813083/oserror-could-not-find-geos-c-dll-or-load-any-of-its-variants),

conda install shapely

For some reason (not sure if this would be the same for everyone), I need to do an uninstall and reinstall it one more time:

conda uninstall shapely
conda install shapely

and it seems to work OK now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant