Closed mwtoews closed 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 ?
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.
@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.
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
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.
@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, 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.
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".
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
).
@mwtoews anything left here to resolve with this issue? May we close it, if not?
Closed as "user error"
As of a few days ago, fiona cannot be installed with matplotlib.
Note there are several other issues here attributed to libpoppler.
Environment (
conda list
):Details about
conda
and system (conda info
):