Python GeoPandas – Fix ImportError: DLL Load Failed: The Specified Module Could Not Be Found

anacondageopandaspython

How can I fix the error and get GeoPandas to work on my Win10 machine?

Solutions tried:

  1. New environment following instructions here
  2. Uninstalling and reinstalling Geopandas

Detailed error:

import geopandas as gpd
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "C:\Program Files\JetBrains\PyCharm 2019.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "C:\Users\**\Anaconda3\envs\rider_env\lib\site-packages\geopandas\__init__.py", line 1, in <module>
    from geopandas._config import options  # noqa
  File "C:\Program Files\JetBrains\PyCharm 2019.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "C:\Users\**\Anaconda3\envs\rider_env\lib\site-packages\geopandas\_config.py", line 126, in <module>
    default_value=_default_use_pygeos(),
  File "C:\Users\**\Anaconda3\envs\rider_env\lib\site-packages\geopandas\_config.py", line 112, in _default_use_pygeos
    import geopandas._compat as compat
  File "C:\Program Files\JetBrains\PyCharm 2019.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "C:\Users\**\Anaconda3\envs\rider_env\lib\site-packages\geopandas\_compat.py", line 8, in <module>
    import pyproj
  File "C:\Program Files\JetBrains\PyCharm 2019.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "C:\Users\**\Anaconda3\envs\rider_env\lib\site-packages\pyproj\__init__.py", line 49, in <module>
    import pyproj.network
  File "C:\Program Files\JetBrains\PyCharm 2019.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "C:\Users\**\Anaconda3\envs\rider_env\lib\site-packages\pyproj\network.py", line 10, in <module>
    from pyproj._network import (  # noqa: F401
  File "C:\Program Files\JetBrains\PyCharm 2019.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
ImportError: DLL load failed: The specified module could not be found.

Best Answer

Just open anaconda CLI. activate your environment and run this command:

pip uninstall pyproj && pip install pyproj

This should resolve your issue with the information that you have provided.

Related Question