1

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.
1
  • I don't use Anaconda, but in vanilla python on windows environments, I find I always have to first install some dependencies of geopandas (Fiona, GDAL, Rtree) using this site of pre-compiled wheels: lfd.uci.edu/~gohlke/pythonlibs
    – Mike Honey
    Commented Apr 18, 2021 at 7:18

1 Answer 1

7

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.

1
  • Great! it works. It is strange that Geopandas default installation has pyproj issue. Commented Mar 14 at 21:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.