conda-forge / fiona-feedstock

A conda-smithy repository for fiona.
BSD 3-Clause "New" or "Revised" License
8 stars 17 forks source link

Fiona + matplotlib = ImportError: libpoppler.so.91: cannot open shared object file #186

Closed mwtoews closed 2 years ago

mwtoews commented 2 years ago

As of a few days ago, fiona cannot be installed with matplotlib.

$ conda create -n myenv -c conda-forge -q matplotlib fiona
...
$ conda activate myenv
$ python -c "import fiona"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/mtoews/miniconda3/envs/myenv/lib/python3.8/site-packages/fiona/__init__.py", line 84, in <module>
    from fiona.collection import BytesCollection, Collection
  File "/home/mtoews/miniconda3/envs/myenv/lib/python3.8/site-packages/fiona/collection.py", line 9, in <module>
    from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
ImportError: libpoppler.so.91: cannot open shared object file: No such file or directory

Note there are several other issues here attributed to libpoppler.


Environment (conda list):

``` $ conda list # packages in environment at /home/mtoews/miniconda3/envs/myenv: # # Name Version Build Channel _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 1_gnu conda-forge attrs 21.2.0 pyhd8ed1ab_0 conda-forge brotli 1.0.9 h7f98852_6 conda-forge brotli-bin 1.0.9 h7f98852_6 conda-forge bzip2 1.0.8 h7f98852_4 conda-forge c-ares 1.18.1 h7f98852_0 conda-forge ca-certificates 2021.10.26 h06a4308_2 cairo 1.16.0 hf32fb01_1 certifi 2021.10.8 py38h578d9bd_1 conda-forge cfitsio 3.470 hb418390_7 conda-forge click 7.1.2 pyh9f0ad1d_0 conda-forge click-plugins 1.1.1 py_0 conda-forge cligj 0.7.2 pyhd8ed1ab_1 conda-forge curl 7.80.0 h2574ce0_0 conda-forge cycler 0.11.0 pyhd8ed1ab_0 conda-forge dbus 1.13.18 hb2f20db_0 expat 2.4.1 h9c3ff4c_0 conda-forge fiona 1.8.13.post1 py38hc820daa_0 fontconfig 2.13.1 h6c09931_0 fonttools 4.28.2 py38h497a2fe_0 conda-forge freetype 2.11.0 h70c0345_0 freexl 1.0.6 h7f98852_0 conda-forge gdal 3.0.2 py38h4694593_1 geos 3.8.0 he6710b0_0 geotiff 1.6.0 h21e8280_0 gettext 0.21.0 hf68c758_0 giflib 5.2.1 h36c2ea0_2 conda-forge glib 2.70.1 h780b84a_0 conda-forge glib-tools 2.70.1 h780b84a_0 conda-forge gst-plugins-base 1.14.0 h8213a91_2 gstreamer 1.14.0 h28cd5cc_2 hdf4 4.2.13 h3ca952b_2 hdf5 1.10.6 nompi_h6a2412b_1114 conda-forge icu 58.2 hf484d3e_1000 conda-forge jpeg 9d h36c2ea0_0 conda-forge json-c 0.13.1 hbfbb72e_1002 conda-forge kealib 1.4.14 hcc255d8_2 conda-forge kiwisolver 1.3.2 py38h1fd1430_1 conda-forge krb5 1.19.2 hcc1bbae_3 conda-forge lcms2 2.12 hddcbb42_0 conda-forge ld_impl_linux-64 2.36.1 hea4e1c9_2 conda-forge libblas 3.9.0 12_linux64_openblas conda-forge libboost 1.73.0 h3ff78a5_11 libbrotlicommon 1.0.9 h7f98852_6 conda-forge libbrotlidec 1.0.9 h7f98852_6 conda-forge libbrotlienc 1.0.9 h7f98852_6 conda-forge libcblas 3.9.0 12_linux64_openblas conda-forge libcurl 7.80.0 h2574ce0_0 conda-forge libdap4 3.19.1 h6ec2957_0 libedit 3.1.20191231 he28a2e2_2 conda-forge libev 4.33 h516909a_1 conda-forge libffi 3.4.2 h7f98852_5 conda-forge libgcc-ng 11.2.0 h1d223b6_11 conda-forge libgdal 3.0.2 h7c14f60_1 libgfortran-ng 11.2.0 h69a702a_11 conda-forge libgfortran5 11.2.0 h5c6108e_11 conda-forge libglib 2.70.1 h174f98d_0 conda-forge libgomp 11.2.0 h1d223b6_11 conda-forge libiconv 1.16 h516909a_0 conda-forge libkml 1.3.0 h7ecb851_5 liblapack 3.9.0 12_linux64_openblas conda-forge libnetcdf 4.6.1 h2053bdc_4 libnghttp2 1.46.0 hce63b2e_0 libnsl 2.0.0 h7f98852_0 conda-forge libopenblas 0.3.18 pthreads_h8fe5266_0 conda-forge libpng 1.6.37 h21135ba_2 conda-forge libpq 12.2 h553bfba_1 libspatialite 4.3.0a h793db0d_0 libssh2 1.10.0 ha56f1ee_2 conda-forge libstdcxx-ng 11.2.0 he4da1e4_11 conda-forge libtiff 4.2.0 h85742a9_0 libuuid 1.0.3 h7f8727e_2 libwebp-base 1.2.1 h7f98852_0 conda-forge libxcb 1.14 h7b6447c_0 libxml2 2.9.12 h03d6c58_0 libzlib 1.2.11 h36c2ea0_1013 conda-forge lz4-c 1.9.3 h9c3ff4c_1 conda-forge matplotlib 3.5.0 py38h578d9bd_0 conda-forge matplotlib-base 3.5.0 py38hf4fb855_0 conda-forge munch 2.5.0 py_0 conda-forge munkres 1.1.4 pyh9f0ad1d_0 conda-forge ncurses 6.2 h58526e2_4 conda-forge numpy 1.21.4 py38he2449b9_0 conda-forge olefile 0.46 pyh9f0ad1d_1 conda-forge openjpeg 2.4.0 hb52868f_1 conda-forge openssl 1.1.1l h7f98852_0 conda-forge packaging 21.3 pyhd8ed1ab_0 conda-forge pcre 8.45 h9c3ff4c_0 conda-forge pillow 7.2.0 py38h9776b28_2 conda-forge pip 21.3.1 pyhd8ed1ab_0 conda-forge pixman 0.40.0 h36c2ea0_0 conda-forge poppler 0.89.0 h2de54a5_5 conda-forge poppler-data 0.4.11 hd8ed1ab_0 conda-forge postgresql 12.2 h553bfba_1 proj 6.2.1 hc80f0dc_0 conda-forge pyparsing 3.0.6 pyhd8ed1ab_0 conda-forge pyqt 5.9.2 py38h05f1152_4 python 3.8.12 hb7a2778_2_cpython conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python_abi 3.8 2_cp38 conda-forge qt 5.9.7 h5867ecd_1 readline 8.1 h46c0cb4_0 conda-forge setuptools 59.2.0 py38h578d9bd_0 conda-forge shapely 1.7.1 py38h1728cc4_0 sip 4.19.13 py38he6710b0_0 six 1.16.0 pyh6c4a22f_0 conda-forge sqlite 3.36.0 h9cd32fc_2 conda-forge tiledb 2.2.9 h91fcb0e_0 conda-forge tk 8.6.11 h27826a3_1 conda-forge tornado 6.1 py38h497a2fe_2 conda-forge unicodedata2 13.0.0.post2 py38h497a2fe_4 conda-forge wheel 0.37.0 pyhd8ed1ab_1 conda-forge xerces-c 3.2.3 h780794e_0 xz 5.2.5 h516909a_1 conda-forge zlib 1.2.11 h36c2ea0_1013 conda-forge zstd 1.4.9 ha95c52a_0 conda-forge ```


Details about conda and system ( conda info ):

``` $ conda info active environment : myenv active env location : /home/mtoews/miniconda3/envs/myenv shell level : 2 user config file : /home/mtoews/.condarc populated config files : /home/mtoews/.condarc conda version : 4.10.3 conda-build version : 3.21.6 python version : 3.9.7.final.0 virtual packages : __linux=4.15.0=0 __glibc=2.27=0 __unix=0=0 __archspec=1=x86_64 base environment : /home/mtoews/miniconda3 (writable) conda av data dir : /home/mtoews/miniconda3/etc/conda conda av metadata url : None channel URLs : https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /home/mtoews/miniconda3/pkgs /home/mtoews/.conda/pkgs envs directories : /home/mtoews/miniconda3/envs /home/mtoews/.conda/envs platform : linux-64 user-agent : conda/4.10.3 requests/2.26.0 CPython/3.9.7 Linux/4.15.0-161-generic ubuntu/18.04.6 glibc/2.27 UID:GID : 2978:2978 netrc file : None offline mode : False ```
akrherz commented 2 years ago

Appears the dep-solver gave you ancient versions of a number of packages in order to get matplotlib=3.5, perhaps some that have broken requirements. perhaps a simple immediate workaround is to install with matplotlib=3.4 ?

ocefpaf commented 2 years ago

We should debug this further and move these ancient packages to the broken label. Also, something is odd with mpl, that should not happen. I'm away for a few days but I can try to do this when I get back.

akrherz commented 2 years ago

@ocefpaf I believe one of the issues is a lack of icu69 + qt , so the dep solver is going way back in time. Another alternative here is to use the matplotlib-base package, so to avoid qt. For me, this pulls in a valid fiona build.

maximlt commented 2 years ago

We see a similar error on geoviews CI but only for Python 3.8/MacOs:


---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/ipykernel_41263/656314893.py in <module>
----> 1 geometries = gpd.read_file('../../assets/boundaries/boundaries.shp')
      2 referendum = pd.read_csv('../../assets/referendum.csv')
      3 gdf = gpd.GeoDataFrame(pd.merge(geometries, referendum))

~/miniconda3/envs/test-environment/lib/python3.8/site-packages/geopandas/io/file.py in _read_file(filename, bbox, mask, rows, **kwargs)
    164     by using the encoding keyword parameter, e.g. ``encoding='utf-8'``.
    165     """
--> 166     _check_fiona("'read_file' function")
    167     filename = _expand_user(filename)
    168 

~/miniconda3/envs/test-environment/lib/python3.8/site-packages/geopandas/io/file.py in _check_fiona(func)
     78 def _check_fiona(func):
     79     if fiona is None:
---> 80         raise ImportError(
     81             f"the {func} requires the 'fiona' package, but it is not installed or does "
     82             f"not import correctly.\nImporting fiona resulted in: {fiona_import_error}"

ImportError: the 'read_file' function requires the 'fiona' package, but it is not installed or does not import correctly.
Importing fiona resulted in: dlopen(/Users/runner/miniconda3/envs/test-environment/lib/python3.8/site-packages/fiona/ogrext.cpython-38-darwin.so, 2): Library not loaded: @rpath/libpoppler.91.dylib
  Referenced from: /Users/runner/miniconda3/envs/test-environment/lib/libgdal.26.dylib
  Reason: image not found
ImportError: the 'read_file' function requires the 'fiona' package, but it is not installed or does not import correctly.
Importing fiona resulted in: dlopen(/Users/runner/miniconda3/envs/test-environment/lib/python3.8/site-packages/fiona/ogrext.cpython-38-darwin.so, 2): Library not loaded: @rpath/libpoppler.91.dylib
  Referenced from: /Users/runner/miniconda3/envs/test-environment/lib/libgdal.26.dylib
  Reason: image not found
conda list ``` # packages in environment at /Users/runner/miniconda3/envs/test-environment: # # Name Version Build Channel appnope 0.1.2 py38h50d1736_2 conda-forge argon2-cffi 21.1.0 py38h96a0964_2 conda-forge async_generator 1.10 py_0 conda-forge attrs 21.2.0 pyhd8ed1ab_0 conda-forge backcall 0.2.0 pyh9f0ad1d_0 conda-forge backports 1.0 py_2 conda-forge backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge beautifulsoup4 4.10.0 pyh06a4308_0 bleach 4.1.0 pyhd8ed1ab_0 conda-forge bokeh 2.4.2 py38h50d1736_0 conda-forge boost-cpp 1.70.0 hd59e818_1 conda-forge brotli 1.0.9 h0d85af4_6 conda-forge brotli-bin 1.0.9 h0d85af4_6 conda-forge brotlipy 0.7.0 py38h9ed2024_1003 bzip2 1.0.8 h1de35cc_0 c-ares 1.18.1 h0d85af4_0 conda-forge ca-certificates 2021.10.8 h033912b_0 conda-forge cairo 1.16.0 h0ab9d94_1001 conda-forge cartopy 0.18.0 py38hf1ba7ce_1 certifi 2021.10.8 py38h50d1736_1 conda-forge cffi 1.14.6 py38h2125817_0 cfitsio 3.470 h01dc385_7 conda-forge cftime 1.5.1.1 py38hbe852b5_1 conda-forge chardet 4.0.0 py38hecd8cb5_1003 charset-normalizer 2.0.4 pyhd3eb1b0_0 click 7.1.2 pyh9f0ad1d_0 conda-forge click-plugins 1.1.1 py_0 conda-forge cligj 0.7.2 pyhd8ed1ab_1 conda-forge cloudpickle 2.0.0 pyhd3eb1b0_0 codecov 2.1.11 pyhd3deb0d_0 conda-forge colorcet 3.0.0 py_0 pyviz/label/dev conda 4.10.3 py38hecd8cb5_0 conda-build 3.21.6 py38hecd8cb5_0 conda-package-handling 1.7.3 py38h9ed2024_1 coverage 6.2 py38h96a0964_0 conda-forge cryptography 35.0.0 py38h2fd3fbb_0 curl 7.76.1 h06286d4_1 conda-forge cycler 0.11.0 pyhd8ed1ab_0 conda-forge cytoolz 0.11.2 py38h96a0964_1 conda-forge dask 2021.11.2 pyhd8ed1ab_0 conda-forge dask-core 2021.11.2 pyhd8ed1ab_0 conda-forge datashader 0.13.0 py_0 pyviz/label/dev datashape 0.5.4 py_1 conda-forge dbus 1.13.18 h18a8e69_0 debugpy 1.5.1 py38ha048514_0 conda-forge decorator 5.1.0 pyhd8ed1ab_0 conda-forge defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge distributed 2021.11.2 py38h50d1736_0 conda-forge doit 0.33.1 py38hecd8cb5_0 entrypoints 0.3 pyhd8ed1ab_1003 conda-forge expat 2.4.1 he49afe7_0 conda-forge filelock 3.3.1 pyhd3eb1b0_1 fiona 1.8.13 py38he71f6a4_0 conda-forge flake8 4.0.1 pyhd8ed1ab_1 conda-forge fontconfig 2.13.1 h10f422b_1005 conda-forge fonttools 4.28.2 py38h96a0964_0 conda-forge freetype 2.10.4 h4cff582_1 conda-forge freexl 1.0.6 h0d85af4_0 conda-forge fsspec 2021.11.1 pyhd8ed1ab_0 conda-forge gdal 3.0.2 py38ha6ec53f_1 geopandas-base 0.10.2 pyha770c72_0 conda-forge geos 3.8.0 h4a8c4bd_1 conda-forge geotiff 1.6.0 h02c1893_0 geoviews 1.9.2.post6+ge78082c dev_0 gettext 0.19.8.1 h7937167_1005 conda-forge giflib 5.2.1 hbcb3906_2 conda-forge glib 2.68.4 he49afe7_0 conda-forge glib-tools 2.68.4 he49afe7_0 conda-forge glob2 0.7 pyhd3eb1b0_0 hdf4 4.2.13 hefd3b78_1005 conda-forge hdf5 1.10.6 nompi_hc5d9132_1114 conda-forge heapdict 1.0.1 py_0 conda-forge holoviews 1.14.6 py_0 pyviz/label/dev icu 58.2 h0a44026_3 idna 3.3 pyhd3eb1b0_0 importlib-metadata 4.2.0 py38h50d1736_0 conda-forge importlib_metadata 4.2.0 hd8ed1ab_0 conda-forge importlib_resources 5.4.0 pyhd8ed1ab_0 conda-forge iniconfig 1.1.1 pyh9f0ad1d_0 conda-forge ipykernel 6.5.1 py38h5fd9f69_0 conda-forge ipython 7.30.0 py38h50d1736_0 conda-forge ipython_genutils 0.2.0 py_1 conda-forge ipywidgets 7.6.5 pyhd8ed1ab_0 conda-forge jedi 0.18.1 py38h50d1736_0 conda-forge jinja2 2.11.3 pyhd3eb1b0_0 jpeg 9d hbcb3906_0 conda-forge json-c 0.13.1 h575e443_1002 conda-forge jsonschema 4.2.1 pyhd8ed1ab_0 conda-forge jupyter 1.0.0 py38h50d1736_7 conda-forge jupyter_client 7.1.0 pyhd8ed1ab_0 conda-forge jupyter_console 6.4.0 pyhd8ed1ab_0 conda-forge jupyter_core 4.9.1 py38h50d1736_1 conda-forge jupyterlab_pygments 0.1.2 pyh9f0ad1d_0 conda-forge jupyterlab_widgets 1.0.2 pyhd8ed1ab_0 conda-forge kealib 1.4.14 h31dd65d_2 conda-forge kiwisolver 1.3.2 py38h12bbefe_1 conda-forge krb5 1.17.2 h60d9502_0 conda-forge lcms2 2.12 h577c468_0 conda-forge libarchive 3.4.2 haa3ed63_0 libblas 3.9.0 12_osx64_openblas conda-forge libbrotlicommon 1.0.9 h0d85af4_6 conda-forge libbrotlidec 1.0.9 h0d85af4_6 conda-forge libbrotlienc 1.0.9 h0d85af4_6 conda-forge libcblas 3.9.0 12_osx64_openblas conda-forge libcurl 7.76.1 h8ef9fac_1 conda-forge libcxx 12.0.1 habf9029_0 conda-forge libdap4 3.19.1 hae55d67_1000 conda-forge libedit 3.1.20191231 h0678c8f_2 conda-forge libev 4.33 haf1e3a3_1 conda-forge libffi 3.3 hb1e8313_2 libgdal 3.0.2 ha1444b2_1 libgfortran 5.0.0 9_3_0_h6c81a4c_23 conda-forge libgfortran5 9.3.0 h6c81a4c_23 conda-forge libglib 2.68.4 hd556434_0 conda-forge libiconv 1.16 h1de35cc_0 libkml 1.3.0 hed7d534_1010 conda-forge liblapack 3.9.0 12_osx64_openblas conda-forge liblief 0.10.1 h0a44026_0 libllvm10 10.0.1 h009f743_3 conda-forge libnetcdf 4.6.1 hfd9a460_4 libnghttp2 1.43.0 h6f36284_1 conda-forge libopenblas 0.3.18 openmp_h3351f45_0 conda-forge libpng 1.6.37 h7cec526_2 conda-forge libpq 12.3 h7049927_3 conda-forge libsodium 1.0.18 hbcb3906_1 conda-forge libspatialite 4.3.0a h9691d84_1033 conda-forge libssh2 1.10.0 h52ee1ee_2 conda-forge libtiff 4.2.0 h87d7836_0 libwebp-base 1.2.1 h0d85af4_0 conda-forge libxml2 2.9.12 hcdb78fc_0 libzlib 1.2.11 h9173be1_1013 conda-forge llvm-openmp 12.0.1 hda6cdc1_1 conda-forge llvmlite 0.36.0 py38h872f124_0 conda-forge locket 0.2.0 py_2 conda-forge lz4-c 1.9.3 h23ab428_1 macfsevents 0.8.1 py38h9ed2024_0 markdown 3.3.4 pyhd8ed1ab_0 conda-forge markupsafe 2.0.1 py38h9ed2024_0 matplotlib 3.5.0 py38h50d1736_0 conda-forge matplotlib-base 3.5.0 py38hc7d2367_0 conda-forge matplotlib-inline 0.1.3 pyhd8ed1ab_0 conda-forge mccabe 0.6.1 py_1 conda-forge mistune 0.8.4 py38h96a0964_1005 conda-forge more-itertools 8.12.0 pyhd8ed1ab_0 conda-forge msgpack-python 1.0.3 py38h12bbefe_0 conda-forge multipledispatch 0.6.0 py_0 conda-forge munch 2.5.0 py_0 conda-forge munkres 1.1.4 pyh9f0ad1d_0 conda-forge nbclient 0.5.9 pyhd8ed1ab_0 conda-forge nbconvert 6.3.0 py38h50d1736_1 conda-forge nbformat 5.1.3 pyhd8ed1ab_0 conda-forge nbsmoke 0.6.0a3 py_0 pyviz/label/dev ncurses 6.2 h2e338ed_4 conda-forge nest-asyncio 1.5.1 pyhd8ed1ab_0 conda-forge netcdf4 1.5.7 py38h1695cb1_0 notebook 6.4.6 pyha770c72_0 conda-forge numba 0.53.1 py38h5b9a75a_1 conda-forge numpy 1.21.4 py38h49b9922_0 conda-forge olefile 0.46 pyh9f0ad1d_1 conda-forge openjpeg 2.3.1 h6cbf5cd_3 conda-forge openssl 1.1.1l h0d85af4_0 conda-forge packaging 21.3 pyhd8ed1ab_0 conda-forge pandas 1.3.4 py38ha53d530_1 conda-forge pandoc 2.16.2 h0d85af4_0 conda-forge pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge panel 0.13.0a19 py_0 pyviz/label/dev param 1.12.1a1 py_0 pyviz/label/dev parso 0.8.2 pyhd8ed1ab_0 conda-forge partd 1.2.0 pyhd8ed1ab_0 conda-forge pcre 8.45 he49afe7_0 conda-forge pexpect 4.8.0 pyh9f0ad1d_2 conda-forge pickleshare 0.7.5 py_1003 conda-forge pillow 7.2.0 py38hef457fe_2 conda-forge pip 21.3.1 pyhd8ed1ab_0 conda-forge pixman 0.38.0 h01d97ff_1003 conda-forge pkginfo 1.7.1 py38hecd8cb5_0 pluggy 1.0.0 py38hecd8cb5_0 poppler 0.90.1 h6db0e4e_0 conda-forge poppler-data 0.4.11 hd8ed1ab_0 conda-forge postgresql 12.3 he852019_3 conda-forge proj 6.2.1 h773a61f_0 conda-forge prometheus_client 0.12.0 pyhd8ed1ab_0 conda-forge prompt-toolkit 3.0.22 pyha770c72_0 conda-forge prompt_toolkit 3.0.22 hd8ed1ab_0 conda-forge psutil 5.8.0 py38h9ed2024_1 ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge py 1.10.0 pyhd3eb1b0_0 py-lief 0.10.1 py38haf313ee_0 pycodestyle 2.8.0 pyhd8ed1ab_0 conda-forge pycosat 0.6.3 py38h1de35cc_1 pycparser 2.21 pyhd3eb1b0_0 pyct 0.4.8 py_0 pyviz/label/dev pyct-core 0.4.8 py_0 pyviz/label/dev pyctdev 0.6.4 py_0 pyviz pyflakes 2.4.0 pyhd8ed1ab_0 conda-forge pygments 2.10.0 pyhd8ed1ab_0 conda-forge pyopenssl 21.0.0 pyhd3eb1b0_1 pyparsing 3.0.6 pyhd8ed1ab_0 conda-forge pyproj 2.4.2.post1 py38h03a428a_0 conda-forge pyqt 5.9.2 py38h655552a_2 pyrsistent 0.18.0 py38h96a0964_0 conda-forge pyshp 2.1.3 pyh44b312d_0 conda-forge pysocks 1.7.1 py38_1 pytest 6.2.5 py38h50d1736_1 conda-forge pytest-cov 3.0.0 pyhd8ed1ab_0 conda-forge python 3.8.12 h88f2d9e_0 python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python-libarchive-c 2.9 pyhd3eb1b0_1 python_abi 3.8 2_cp38 conda-forge pytz 2021.3 pyhd3eb1b0_0 pyviz_comms 2.1.0 py_0 pyviz/label/dev pyyaml 6.0 py38hca72f7f_1 pyzmq 22.3.0 py38hd3b92b6_1 conda-forge qt 5.9.7 h93ee506_2 conda-forge qtconsole 5.2.1 pyhd8ed1ab_0 conda-forge qtpy 1.11.2 pyhd8ed1ab_0 conda-forge readline 8.1 h05e3726_0 conda-forge requests 2.26.0 pyhd3eb1b0_0 ripgrep 12.1.1 0 ruamel_yaml 0.15.100 py38h9ed2024_0 scipy 1.7.3 py38hd329d04_0 conda-forge send2trash 1.8.0 pyhd8ed1ab_0 conda-forge setuptools 59.4.0 py38h50d1736_0 conda-forge shapely 1.7.0 py38hc980d86_1 conda-forge sip 4.19.8 py38h0a44026_0 six 1.16.0 pyhd3eb1b0_0 sortedcontainers 2.4.0 pyhd8ed1ab_0 conda-forge soupsieve 2.3.1 pyhd3eb1b0_0 sqlite 3.37.0 h23a322b_0 conda-forge tblib 1.7.0 pyhd8ed1ab_0 conda-forge terminado 0.12.1 py38h50d1736_1 conda-forge testpath 0.5.0 pyhd8ed1ab_0 conda-forge tiledb 2.2.9 he9a4fb4_0 conda-forge tk 8.6.11 h5dbffcc_1 conda-forge toml 0.10.2 pyhd8ed1ab_0 conda-forge tomli 1.2.2 pyhd8ed1ab_0 conda-forge toolz 0.11.2 pyhd8ed1ab_0 conda-forge tornado 6.1 py38h96a0964_2 conda-forge tqdm 4.62.3 pyhd3eb1b0_1 traitlets 5.1.1 pyhd8ed1ab_0 conda-forge typing_extensions 4.0.0 pyha770c72_0 conda-forge tzcode 2021e h0d85af4_0 conda-forge unicodedata2 13.0.0.post2 py38h96a0964_4 conda-forge urllib3 1.26.7 pyhd3eb1b0_0 wcwidth 0.2.5 pyh9f0ad1d_2 conda-forge webencodings 0.5.1 py_1 conda-forge wheel 0.37.0 pyhd8ed1ab_1 conda-forge widgetsnbextension 3.5.2 py38h50d1736_1 conda-forge xarray 0.20.1 pyhd8ed1ab_0 conda-forge xerces-c 3.2.3 h48eee30_0 xz 5.2.5 haf1e3a3_1 conda-forge yaml 0.2.5 haf1e3a3_0 zeromq 4.3.4 he49afe7_1 conda-forge zict 2.0.0 py_0 conda-forge zipp 3.6.0 pyhd8ed1ab_0 conda-forge zlib 1.2.11 h9173be1_1013 conda-forge zstd 1.4.9 h322a384_0 name: test-environment channels: - defaults prefix: /Users/runner/miniconda3/envs/test-environment/envs/test-environment ```
ocefpaf commented 2 years ago

so the dep solver is going way back in time

Yeah, and those old packages should probably be marked as broken due to bad pins. The problem is how to properly identify them.

akrherz commented 2 years ago

@ocefpaf, so in the original example, we have libgal 3.0.2 h7c14f60_1, which isn't a conda-forge package!

@mwtoews , your conda info does not appear to show the conda-forge channel as an option. Additionally, do you have channel priority set to strict?

ocefpaf commented 2 years ago

@ocefpaf, so in the original example, we have libgal 3.0.2 h7c14f60_1, which isn't a conda-forge package!

Ah! Good to know!! I tried my best to remove as many broken pkgs as I could in the past and I thought I missed one.

mwtoews commented 2 years ago

It seems that conda-forge was not added to the environment, which is why gdal was taken from pkgs/main. This is a bit of a surprise to me, as I assumed that the options passed to conda create e.g. -c / --channel would apply to the new environment, and dependencies like gdal.

Adding --strict-channel-priority to the initial command shown in this issue installs everything from conda-forge and fixes the import error. Is there a better "fix"? Otherwise this issue can be resolved as a "user error".

dopplershift commented 2 years ago

Passing a channel on the commandline does NOT persist it. You have to manually add it to either your user config (conda config default) or your environment config (conda config --env).

akrherz commented 2 years ago

@mwtoews anything left here to resolve with this issue? May we close it, if not?

mwtoews commented 2 years ago

Closed as "user error"