0

I am trying to read a shapefile using python's geopandas in vscode. I successfully installed geopandas using conda, but when I use gpd.read_file, I get the following error output:

ImportError: the 'read_file' function requires the 'fiona' package, but it is not installed or does not import correctly.
Importing fiona resulted in: DLL load failed while importing ogrext: The specified module could not be founds

I am trying to follow the following solution: ImportError: the 'read_file' function requires the 'fiona' package, but it is not installed or does not import correctly. Importing fiona resulted in:

Apparently, I was using below versions of GDAL and fiona combinations which didn't work for me.

GDAL-3.3.2-cp38-cp38-win_amd64.whl

Fiona-1.8.20-cp38-cp38-win_amd64.whl

I had to uninstall the above versions and install the below versions instead. This resolved the issue.

GDAL-3.2.3-cp38-cp38-win_amd64.whl

Fiona‑1.8.19‑cp38‑cp38‑win_amd64.whl

Should I uninstall gdal and fiona using pip uninstall gdal fiona and then use pip install <version> to install the working versions? Also, since the post is from Oct 2021, should I still use the mentioned versions?

prayner
  • 393
  • 1
  • 10
  • Why are you installing `fiona` and `gdal` using pip (wheels), but `geopandas` using conda? Conda will almost always prevent incompatible builds to be installed simultaneously, I would start by installing everything that you need using conda as much as possible. – Rutger Kassies Jul 21 '22 at 07:08
  • 1
    I installed these packages using miniconda, but had issues with geopandas. I found a solution that said to reinstall older compatible versions of fiona and gdal. Following your recommendation, I will uninstall all packages and then purely install packages with conda to see if it works. – prayner Jul 21 '22 at 09:32

0 Answers0