简体   繁体   中英

Need help installing fiona and geopandas for python in Windows 10 - getting can't load requested DLL error

I am trying to install fiona and geopandas for python on Windows 10 and keep running into an error "ERROR 1: Can't load requested DLL".

I know this question is similar to other questions that have been asked, but I have followed the steps in multiple answers and tutorials and still can't seem to get this to work.

The closest I got was using the steps outlined in this tutorial : https://geoffboeing.com/2014/09/using-geopandas-windows/

and are summarized as follows:

  1. installed the .whl files for rtree, pyproj, shapely, gdal, geopandas, fiona from https://www.lfd.uci.edu/~gohlke/pythonlibs/

    • Rtree-0.8.3-cp37-cp37m-win_amd64.whl
    • pyproj-2.2.1-cp37-cp37m-win_amd64.whl
    • GDAL-3.0.0-cp37-cp37m-win_amd64.whl
    • geopandas-0.5.0-py2.py3-none-any.whl
    • Fiona-1.8.6-cp37-cp37m-win_amd64.whl
    • Shapely-1.6.4.post2-cp37-cp37m-win_amd64.whl
  2. navigated to download folder and used pip install to install GDAL wheel

  3. added the osgeo path to my windows user Path environment variable

环境变量屏幕

  1. used pip install to install remaining wheels (geopandas last), everything installed without errors
  2. As a check, I ran gdalinfo --help-general and get the following output:

gdalinfo 输出

This is where I get the "ERROR 1: Can't load requested DLL:" error. It says it cannot find the specified module "ogr_FileGDB.dll". The weird thing is, that .dll is actually in the location that it is looking in???

dll位置

Also, in python shell, when trying to import fiona or geopandas I get the following errors:

导入错误

This is beyond my level of troubleshooting...would really appreciate if anyone could get this thing working for me!!!!

FYI - running Python 3.7.3, Windows 10, pip is updated.

Lastly and potentially important (not sure how it plays in?) I already have a GDAL_DATA system variable defined, and also (maybe incorrectly?) also tried adding the osgeo path to my system path variable:

系统环境变量

I was using a GDAL version that was not compatible with Fiona and subsequently causing issues with geopandas.

I uninstalled GDAL 3 and installed GDAL 2.4.1 and it worked fine, as cgohlke suggested.

pip install wheels
pip install pipwin

pipwin install numpy
pipwin install pandas
pipwin install shapely
pipwin install gdal
pipwin install fiona
pipwin install pyproj
pipwin install six
pipwin install rtree
pipwin install geopandas

here are the source links: http://geopandas.org/install.html#installation https://pip.pypa.io/en/latest/user_guide/#installing-from-wheels https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy

If you still have problems, consider uninstalling the above (pip uninstall) and reinstalling.

Install fiona with conda , then that will solve the GDAL problem. pip install geopandas should work after that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM