I'm trying to install QGIS using the Anaconda package manager in a new environment. I have done this successfully before (not sure if it was on this specific Windows laptop, but probably) and also have colleagues who have it running on Windows.
I install it a new environment with:
conda create -n qgis-test -c conda-forge qgis
I activate the environment and try to launch QGIS at the command line. I get the following message:
The procedure entry point ?data@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADXZ could not be located in the dynamic link library C:\Miniconda3\envs\qgis-test\Library\bin\gdal304.dll.
Similar questions/answers in GIS.SE are old (in some cases quite old). They also refer to copying DLLs or changing paths, which seems less than promising to me, as I have colleagues running this on very similar setups (including having QGIS installed separately through OSGeo4W). I also thought that Anaconda's virtual environment sandboxing would prevent DLLs outside the environment directory from short circuiting the path search.
For what it's worth, where qgis
indicates that I am running the expected binary (C:\Miniconda3\envs\qgis-test\Library\bin\qgis.exe
), and C:\Miniconda3\envs\qgis-test\Library\bin\gdal304.dll
does in fact exist.
A partial result of conda list
with potentially relevant packages:
gdal 3.4.1 py310h7990aed_4 conda-forge
libgdal 3.4.1 h6b2b983_4 conda-forge
python 3.10.4 h9a09f29_0_cpython conda-forge
qgis 3.18.3 py310h341bce4_9 conda-forge