Closed Sieboldianus closed 8 months ago
@Sieboldianus , sorry that you didn't get a response to this. Fixing windows build troubles is always painful to will the spare energy to look into :/ Are you still reproducing this? I tried just now and failed to.
$ mamba create -n dev fiona
$ conda activate dev
$ python -c "import fiona;print(fiona.__version__);"
1.9.4
Hi @akrherz , thank you, and I completely understand (re: Windows).
I tried your exact steps, except that I used conda
instead of mamba
, and could still reproduce my issue:
$ conda create -n dev fiona
$ conda activate dev
$ python -c "import fiona;print(fiona.__version__);"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\tools\Miniconda3\envs\dev\Lib\site-packages\fiona\__init__.py", line 86, in <module>
from fiona._env import (
ImportError: DLL load failed while importing _env: The specified module could not be found.
I have been facing a similar issue over the past month. My solution was to use pyogrio
instead of fiona
for reading shapefiles within geopandas
.
That said, I am still having the issue with fiona
. Documenting here in case it helps. I am also using conda
instead of mamba
.
Similar issue within the terminal.
I don't have much experience with these things, but happy to help troubleshoot if it is useful.
Thanks, can we ensure that we have:
conda-forge
in your channel URLS? conda info
conda config --show channel_priority
Ok, so first:
I just tried with a fresh mambaforge
installation (chocolatey), and this time it worked:
$ mamba create -n dev fiona
$ mamba activate dev
$ python -c "import fiona;print(fiona.__version__);"
1.9.4
This is my conda info:
(I don't have conda-forge in my channel urls, as I usually use -c conda-forge
- but the results are the same)
conda info
> active environment : None
user config file : C:\Users\AD\.condarc
populated config files :
conda version : 22.9.0
conda-build version : not installed
python version : 3.7.4.final.0
virtual packages : __cuda=12.0=0
__win=0=0
__archspec=1=x86_64
base environment : C:\tools\Miniconda3 (writable)
conda av data dir : C:\tools\Miniconda3\etc\conda
conda av metadata url : None
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : C:\tools\Miniconda3\pkgs
C:\Users\AD\.conda\pkgs
C:\Users\AD\AppData\Local\conda\conda\pkgs
envs directories : C:\tools\Miniconda3\envs
C:\Users\AD\.conda\envs
C:\Users\AD\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/22.9.0 requests/2.28.1 CPython/3.7.4 Windows/10 Windows/10.0.19041
administrator : False
netrc file : None
offline mode : False
My channel priority is set to flexible:
conda config --show channel_priority
> channel_priority: flexible
I also reproduced this issue on two different computers.
On a reproducer, what does conda list
report?
conda activate dev
conda list
> # packages in environment at C:\tools\Miniconda3\envs\dev:
#
# Name Version Build Channel
attrs 22.1.0 py311haa95532_0
blas 1.0 mkl
blosc 1.21.3 h6c2663c_0
boost-cpp 1.82.0 h59b6b97_1
bzip2 1.0.8 he774522_0
ca-certificates 2023.08.22 haa95532_0
cairo 1.16.0 haedb8bc_5
certifi 2023.7.22 py311haa95532_0
cfitsio 3.470 h2bbff1b_7
click 8.0.4 py311haa95532_0
click-plugins 1.1.1 pyhd3eb1b0_0
cligj 0.7.2 pyhd3eb1b0_0
colorama 0.4.6 py311haa95532_0
expat 2.5.0 hd77b12b_0
fiona 1.9.1 py311heda8569_0
fontconfig 2.14.1 h9c4af85_2
freetype 2.12.1 ha860e81_0
freexl 1.0.6 h2bbff1b_0
gdal 3.6.2 py311h4e7b5b2_3
geos 3.8.0 h33f27b4_0
geotiff 1.7.0 h4545760_1
glib 2.69.1 h5dc1a3c_2
hdf4 4.2.13 h712560f_2
hdf5 1.12.1 h51c971a_3
icc_rt 2022.1.0 h6049295_2
intel-openmp 2023.1.0 h59b6b97_46319
jpeg 9e h2bbff1b_1
kealib 1.5.0 hde4a422_1
lcms2 2.12 h83e58a3_0
lerc 3.0 hd77b12b_0
libboost 1.82.0 hae598e9_1
libcurl 8.1.1 h86230a5_0
libdeflate 1.17 h2bbff1b_0
libffi 3.4.4 hd77b12b_0
libgdal 3.6.2 h676b171_3
libiconv 1.16 h2bbff1b_2
libkml 1.3.0 h63940dd_7
libnetcdf 4.8.1 h6685c40_4
libpng 1.6.39 h8cc25b3_0
libpq 12.15 h906ac69_0
libspatialite 4.3.0a h6ec8781_23
libssh2 1.10.0 he2ea4bf_2
libtiff 4.5.1 hd77b12b_0
libwebp-base 1.3.2 h2bbff1b_0
libxml2 2.10.4 h0ad7f3c_1
libzip 1.8.0 h289538f_1
lz4-c 1.9.4 h2bbff1b_0
mkl 2023.1.0 h6b88ed4_46357
mkl-service 2.4.0 py311h2bbff1b_1
mkl_fft 1.3.8 py311h2bbff1b_0
mkl_random 1.2.4 py311h59b6b97_0
munch 2.5.0 pyhd3eb1b0_0
numpy 1.25.2 py311hdab7c0b_0
numpy-base 1.25.2 py311hd01c5d8_0
openjpeg 2.4.0 h4fc8c34_0
openssl 3.0.11 h2bbff1b_2
pcre 8.45 hd77b12b_0
pcre2 10.42 h0ff8eda_0
pip 23.2.1 py311haa95532_0
pixman 0.40.0 h2bbff1b_1
poppler 22.12.0 h268424c_0
poppler-data 0.4.11 haa95532_1
proj 6.2.1 h3758d61_0
python 3.11.5 he1021f5_0
qhull 2020.2 h59b6b97_2
setuptools 68.0.0 py311haa95532_0
shapely 2.0.1 py311h672afca_0
six 1.16.0 pyhd3eb1b0_1
sqlite 3.41.2 h2bbff1b_0
tbb 2021.8.0 h59b6b97_0
tiledb 2.3.3 hd8964de_3
tk 8.6.12 h2bbff1b_0
tzdata 2023c h04d1e81_0
uriparser 0.9.7 h2bbff1b_0
vc 14.2 h21ff451_1
vs2015_runtime 14.27.29016 h5e58377_2
wheel 0.38.4 py311haa95532_0
xerces-c 3.2.4 hd77b12b_1
xz 5.4.2 h8cc25b3_0
zlib 1.2.13 h8cc25b3_0
zstd 1.5.5 hd43e919_0
Erm, you need to be using conda-forge
and not the defaults/anaconda repo.
Ok, understood - I tested, and this time, it works:
conda create -n dev3 fiona -c conda-forge
conda activate dev3
python -c "import fiona;print(fiona.__version__);"
> 1.9.4
In my original (initial) post, this did not work. It seems solved know!
Apologies for any confusion and many thanks for your help, @akrherz !
This seems solved. Please reopen if that is not the case.
This seems solved. Please reopen if that is not the case.
B/c similar problems can have different causes, please open a new issue instead and paste the debugging information. We should lock this one to avoid red herrings debugging.
Ok, since the original reporter gave his thumbs up on the closing, I'll lock it.
Solution to issue cannot be found in the documentation.
Issue
I have a package with fiona that (still) needs to be installed in Windows.
The error appears to be related to gdal and the conda installaton of fiona. I could reproduce it both with the anaconda distribution and conda-forge channel. The error is raised by fiona, so I came here to report it.
When gdal and fiona are installed in versions larger than fiona 1.8.22, the following occurs:
I tried with different combinations, channels and versions.
First, adding:
does not solve the error.
Further:
works in all combinations, except when gdal 3.4.1 is installed, then this happens:
Click
![image](https://github.com/conda-forge/gdal-feedstock/assets/13646666/44bdad9f-caa8-4f49-bd5e-e9d3728ed3c3)I think this is not related and can be ignored.
Installed packages
Minimal steps to preproduce:
-> gdal 3.6.2 -> fiona 1.9.1
-> works -> gdal 3.0.2 -> fiona 1.8.22
Conda-forge:
-> does not work -> gdal-3.6.4 -> fiona-1.9.3
-> works -> gdal-3.6.1 -> fiona-1.8.22
Environment info
I have Miniconda installed with Chocolatey. The tests above have been run in plain Windows CMD.