Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mgrover1 opened this issue Mar 18, 2024 · 5 comments · Fixed by #622
Closed

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

mgrover1 opened this issue Mar 18, 2024 · 5 comments · Fixed by #622
Labels
type: bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@mgrover1
Copy link

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.

@mgrover1 mgrover1 added the type: bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Mar 18, 2024
@mgrover1 mgrover1 changed the title [Bug]: Unable to create conda environment for development environment on M1 Mac Bug: Unable to create conda environment for development environment on M1 Mac Mar 18, 2024
@pochedls
Copy link
Collaborator

@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
Copy link
Collaborator

@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
Copy link
Collaborator

This worked for me.

@tomvothecoder
Copy link
Collaborator

@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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants