Im on windows 64bit,
Have installed python 3.5 and cannot load the Fiona module (Fiona source is from Golke: Fiona‑1.7.1‑cp35‑cp35m‑win_amd64.whl)
GDAL is also from Golke, first I had GDAL‑2.0.3‑cp35‑cp35m‑win_amd64.whl, but after an update to GDAL‑2.1.2‑cp35‑cp35m‑win_amd64.whl it fails to load as well.
from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-2-5228042b14eb> in <module>()
----> 1 from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
c:\python35\lib\site-packages\fiona\__init__.py in <module>()
74 except ImportError:
75 pass
---> 76 from fiona.collection import Collection, BytesCollection, vsi_path
77 from fiona._drivers import driver_count, GDALEnv
78 from fiona.drvsupport import supported_drivers
c:\python35\lib\site-packages\fiona\collection.py in <module>()
6
7 from fiona import compat
----> 8 from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
9 from fiona.ogrext import Session, WritingSession
10 from fiona.ogrext import (
ImportError: DLL load failed: The specified module could not be found.
p.s I've another win 64-bit system running Fiona 1.7.0 with GDAL just fine
add. Hm, using the Fiona 1.7.0 wheel it als fails on my windows system (windows server 2012)
Have you tried uninstalling fiona, gdal and eventually rasterio and installing the latest version again? I got this kind of error message when I upgraded gdal without recompiling fiona.
I forced to install newest gdal from Gohlke (pip install gdal.xx.xx.whl --upgrade) and also the whl from fiona (pip install fiona.xx.xx.whl --upgrade) and after that I could import all modules. Issue can be closed
EDIT August 2019
I ran into this issue again and eventually found out that GDAL version 3 is not yet supported by Fiona. So installing GDAL 2.4.1 from Gohlke resolved my issue.
Note: Apparently I did already knew this since I'd answered this as well on SO last June..
Thanks for following up @mattijn!
i seem to run into this issue as well
Using:
GDAL-2.1.2-cp27-cp27m-win32.whl and
Fiona-1.7.1-cp27-cp27m-win32.whl
on a win 8 machine (with python 2.7), running from git bash.
Uninstalling, wiping the venv or running the upgrade as @mattijn suggested does not wor either
Traceback (most recent call last):
File "importer.py", line 4, in <module>
import fiona
File "D:\code\dvh2-prototype\venv\lib\site-packages\fiona\__init__.py", line 76, in <module>
from fiona.collection import Collection, BytesCollection, vsi_path
File "D:\code\dvh2-prototype\venv\lib\site-packages\fiona\collection.py", line 8, in <module>
from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
ImportError: DLL load failed: The specified module could not be found.
i tried re-installing python (this time 64 bit) and installing the 64-bit versions, same error. Also tried
Fiona-1.7.1-cp27-cp27m-win_amd64.whl, still no luck
Have you installed the Microsoft Visual C++ 2008 redistributable packages?
Many binaries depend on numpy-1.11+mkl and the Microsoft Visual C++ 2008 (x64, x86, and SP1 for CPython 2.6 and 2.7), Visual C++ 2010 (x64, x86, for CPython 3.3 and 3.4), or the Visual C++ 2015 (x64 and x86 for CPython 3.5 and 3.6) redistributable packages.
I had a similar error, that could be recreated with the following script on Windows 10 x64, Python27:
md C:\VirtualEnvs\test
cd C:\VirtualEnvs
C:\Python27\Scripts\virtualenv test
C:\VirtualEnvs\test\Scripts\activate
python -m pip install pip -U
pip install D:\Installation\Python\GDAL-2.2.4-cp27-cp27m-win_amd64.whl
pip install D:\Installation\Python\Fiona-1.7.13-cp27-cp27m-win_amd64.whl
python -c "import fiona"
Caused:
(test) C:\VirtualEnvs>python -c "import fiona"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\VirtualEnvs\test\lib\site-packages\fiona\__init__.py", line 77, in <module>
from fiona.collection import Collection, BytesCollection, vsi_path
File "C:\VirtualEnvs\test\lib\site-packages\fiona\collection.py", line 9, in <module>
from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
ImportError: DLL load failed: The specified module could not be found.
As hinted at above The solution for was to install numpy:
pip install numpy
Then all imports etc. were fine. Is numpy a required dependencyfor fiona?
I have the same issue on Windows 10 in an Anaconda environment. I have tried to update both with conda update and nothing has changed.
fiona 1.8.6
gdal 2.4.2
vs2015_runtime 14.16.27012
Most helpful comment
I forced to install newest gdal from Gohlke (
pip install gdal.xx.xx.whl --upgrade) and also the whl from fiona (pip install fiona.xx.xx.whl --upgrade) and after that I could import all modules. Issue can be closedEDIT August 2019
I ran into this issue again and eventually found out that GDAL version 3 is not yet supported by Fiona. So installing GDAL 2.4.1 from Gohlke resolved my issue.
Note: Apparently I did already knew this since I'd answered this as well on SO last June..