I’m having some issues with CondaPkg.jl in order to get a conda environment configured and running for one of my packages. I basically have a list of dependencies, which if I add to an environment.yml
file and and create an conda environment with those using micromamba everything works great.
However, if I try to mimic exactly the same environment.yml
file with the CondaPkg.toml
file, even if I pin the exact same versions I don’t get the same behaviour.
This is the conda environment I’m trying to reproduce:
name: oggm_env
channels:
- conda-forge
dependencies:
- python<3.12
- numpy<2.0
- scipy
- pandas
- shapely
- matplotlib
- Pillow
- netcdf4
- scikit-image
- configobj
- xarray
- pytest
- dask
- bottleneck
- pyproj
- cartopy
- geopandas
- rasterio
- rioxarray
- seaborn
- pytables
- salem
- motionless
- pip
- pip:
- joblib
- progressbar2
- git+https://github.com/OGGM/pytest-mpl
- oggm
and this is how my CondaPkg.toml
file looks like:
[deps]
bottleneck = ""
netcdf4 = ""
pyproj = ""
matplotlib = ""
pytables = ""
pip = ""
configobj = ""
seaborn = ""
rioxarray = ""
pandas = ""
dask = ""
xarray = ""
python = "<3.12"
Pillow = ""
rasterio = ""
cartopy = ""
salem = ""
geopandas = ""
pytest = ""
shapely = ""
motionless = ""
numpy = "<2.0"
scipy = ""
scikit-image = ""
[pip.deps]
oggm = ""
certifi = ""
progressbar2 = ""
joblib = ""
pytest-mpl = "@ git+https://github.com/OGGM/pytest-mpl"
MBSandbox = "@ git+https://github.com/OGGM/massbalance-sandbox"
[extras]
channels = ["conda-forge"]
For some strange reason, when CondaPkg.jl installs it automatically using micromamba, it doesn’t produce the same library versions as if I do it directly with micromamba. This results in the following error when using the oggm
library which calls pandas
, which in turn has pytables
as a dependency:
ERROR: Python: ImportError: Pandas requires version '3.8.0' or newer of 'tables' (version '3.7.0' currently installed).
If I try to pin pytables
to >=3.8, it just never manages to solve the environment. Strangely, this doesn’t happen directly with micromamba, and version 3.10 is installed there.
Any ideas what could explain these inconsistencies and how to tackle this problem? Strangely, this used to work a few weeks ago, but something must have changed in the process. Thanks!