xCDAT / xcdat

An extension of xarray for climate data analysis on structured grids.
https://xcdat.readthedocs.io/en/latest/
Apache License 2.0
101 stars 11 forks source link

Bug: Unable to create conda environment for development environment on M1 Mac #619

Closed mgrover1 closed 3 months ago

mgrover1 commented 3 months ago

What happened?

I tried creating the conda environment for this project (https://github.com/xCDAT/xcdat/blob/main/conda-env/dev.yml) on an M1 macbook (arm architecture) and ran into issues with the pandoc installation. This is also related to

What did you expect to happen? Are there are possible answers you came across?

I expected to be able to run

conda env create -f conda-env/dev.yml

but ran into the following issue

Could not solve for environment specs
The following package could not be installed
└─ pandoc 3.1.1**  does not exist (perhaps a typo or a missing channel).

Minimal Complete Verifiable Example (MVCE)

conda env create -f conda-env/dev.yml

Relevant log output

[+] 0.1s
conda-forge/noarch                                            No change
pkgs/main/noarch                                              No change
pkgs/r/osx-arm64                                              No change
pkgs/r/noarch                                                 No change
pkgs/main/osx-arm64                                @  11.1MB/s  0.2s
conda-forge/osx-arm64                                8.9MB @  17.8MB/s  0.5s

Looking for: ["python[version='>=3.9']", "cf_xarray[version='>=0.7.3']", 'cftime', 'dask', 'lxml', 'netcdf4', "numpy[version='>=1.23.0']", 'pandas', 'python-dateutil', "xarray[version='>=2022.02.0']", "xesmf[version='>=0.7.0']", 'xgcm', "matplotlib-base[version='>=3.7.0']", 'nc-time-axis=1.4.1', 'sphinx=5.3.0', 'sphinx-autosummary-accessors=2022.4.0', 'sphinx-book-theme=1.0.1', 'sphinx-copybutton=0.5.1', 'nbsphinx=0.9.1', 'pandoc=3.1.1', 'ipython=8.11.0', 'gsw-xarray=0.3.0', 'types-python-dateutil', 'black=23.3.0', 'flake8=6.0.0', 'flake8-isort=6.0.0', 'isort=5.12.0', 'mypy=1.4.0', 'pre-commit=3.2.0', 'pytest', 'pytest-cov', 'jupyterlab', 'tbump']

Could not solve for environment specs
The following package could not be installed
└─ pandoc 3.1.1**  does not exist (perhaps a typo or a missing channel).
(base) mgrover@evswl129 xcdat % Could not solve for environment specs
The following package could not be installed
└─ pandoc 3.1.1**  does not exist (perhaps a typo or a missing channel).

Anything else we need to know?

It should be possible to build a development environment on a recent Mac machine.

Environment

Unable to do this here as the environment will not build.

pochedls commented 3 months ago

@tomvothecoder – I was able to reproduce this on an M2 Mac. Do you think we can drop the pandoc dependency for xcdat-dev (maybe we could have a separate maintainer env for repo administration/documentation and xcdat-dev could be purely for contributing to xcdat functionality)?

tomvothecoder commented 3 months ago

@tomvothecoder – I was able to reproduce this on an M2 Mac. Do you think we can drop the pandoc dependency for xcdat-dev (maybe we could have a separate maintainer env for repo administration/documentation and xcdat-dev could be purely for contributing to xcdat functionality)?

I was also able to reproduce this issue on my M2 Mac, but resolved it in #622 by dropping the pins for documentation dependencies. pandoc>=3.12 supports osx-arm64. Can you check out this PR branch and try it out too?

We should keep pandoc and other doc dependencies in the dev env so there is single env for dev, which is easier to use and maintain compared to multiple dev envs (e.g., one for code dev, one for doc).

pochedls commented 3 months ago

This worked for me.

tomvothecoder commented 3 months ago

@pochedls Thanks for confirming. I merged PR #622 to fix this issue.

@mgrover1 Can you try to building the dev env on your M1 Mac using the latest main dev env?

mgrover1 commented 3 months ago

@tomvothecoder - this issue is resolved!! Thanks for the fix here!