Search code examples
pythonpipcondapython-wheelfiona

Why is Python package Fiona is searching for Microsoft.VC90.DebugCRT?


I installed Python package Fiona. When I try to import it in my application, I get the following error:

File "C:\Anaconda3\lib\site-packages\fiona\collection.py", line 7, in

from fiona.ogrext import Iterator, ItemsIterator, KeysIterator

ImportError: DLL load failed: The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.

I used Windows's "Event Viewer" and checked the problem:

Activation context generation failed for "C:\Anaconda3\Library\bin\netcdf.dll". Dependent Assembly Microsoft.VC90.DebugCRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found. Please use sxstrace.exe for detailed diagnosis.

From this question I gather that some module is using a debug library, which it shouldn't. I thought that maybe it's GDAL? How can I detect whether Fiona itself or some dependency of Fiona is doing it?

I tried to uninstall Fiona (and GDAL) and reinstall them.

I can successfully uninstall and install them using:

conda uninstall fiona 
conda uninstall gdal
conda install fiona
conda install gdal

But the error remains.


Solution

  • I got my code working by using the Windows binaries from the following page: http://www.lfd.uci.edu/~gohlke/pythonlibs/

    and installing them with the command:

    pip install C:\<path>\some_wheel.whl