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

mamba on windows "mamba: command not found" #59

Closed
AndrewAnnex opened this issue Aug 2, 2020 · 8 comments · Fixed by #100
Closed

mamba on windows "mamba: command not found" #59

AndrewAnnex opened this issue Aug 2, 2020 · 8 comments · Fixed by #100
Labels
type:bug Something isn't working
Milestone

Comments

@AndrewAnnex
Copy link

on a currently private repo I am trying to use mamba to build on mac/linux/windows but I am running into a command not found error on the windows worker, seems like mamba is not available even after successful install as show in the logs.

partial config:

test_runner:
    name: (${{ matrix.python-version }}, ${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: ["ubuntu-latest", "macos-latest", "windows-latest"]
        python-version: ["3.8"]
    steps:
      - uses: actions/checkout@v2
      - name: setup miniconda
        uses: goanpeca/setup-miniconda@v1
        with:
          mamba-version: "*"
          python-version: ${{ matrix.python-version }}
          channels: conda-forge,defaults
          channel-priority: true
          activate-environment: pangeo_test
          auto-update-conda: true
          use-only-tar-bz2: true
      - name: conda info
        shell: bash -l {0}
        run: |
          conda info
      - name: mamba install packages
        shell: bash -l {0}
        run: mamba install ... (command not found error here)
@jaimergp
Copy link
Member

Would it be possible to post a reproducible case for a public repo? I can look into it!

@AndrewAnnex
Copy link
Author

AndrewAnnex commented Sep 14, 2020 via email

@jaimergp
Copy link
Member

I could make a new public repo with that GitHub action configured as well if that will help

Yeah, that will help immensely, thanks!

@goanpeca goanpeca added the type:bug Something isn't working label Sep 16, 2020
@AndrewAnnex
Copy link
Author

@jaimergp I made a demo repo and see that the issue is occuring in this runner: https://github.com/AndrewAnnex/test_setup_miniconda_github_action/runs/1140527924

It looks like maybe the "activate-environment" flag is the issue, it is installing mamba to the base environment, but since I don't have an environment yaml file and I specify to create a new environment and activate it, the scripts don't seem to install mamba elsewhere like it does with the ubuntu workers.

I think making an environment yaml with mamba as a dependency would fix that, but I don't know if mamba would be used to bootstrap that new environment so I think I would loose the benefits of mamba...

@jaimergp
Copy link
Member

Thanks! I'll add this to my list... it's definitely interesting!

@jaimergp
Copy link
Member

Behavior should be the same on Ubuntu (we only install mamba on base), so there's definitely a %PATH% issue there...

${MINICONDA}/condabin should always be on PATH, and that's where both conda and mamba are called from. This is independent of activated environments. On Windows, the absolute path to mamba is C:\Miniconda\condabin\mamba.bat and it's being used in the setup steps. You could try using that abs path instead, but let's see if we can have mamba working.

printenv reveals that PATH does contain it: https://github.com/AndrewAnnex/test_setup_miniconda_github_action/runs/1140527924#step:4:158

The only difference I see is that you are using inline YAML instead of the "paragraph YAML" pipe style. It shouldn't have any difference, but I've seen weirder things happen. Just to make sure, can you do this:

      - name: mamba install packages
        shell: bash -l {0}
        run: |
          conda install jupyter
          mamba install jupyterlab

benbovy added a commit to fastscape-lem/ipyfastscape that referenced this issue Nov 5, 2020
benbovy added a commit to fastscape-lem/ipyfastscape that referenced this issue Nov 5, 2020
benbovy added a commit to fastscape-lem/ipyfastscape that referenced this issue Nov 5, 2020
* setup github actions (tests, lint)

* fix black lint

* setup-mininconda v2 not released yet

* fix package name

* try fix ipywidget import error

see jupyter-widgets/ipywidgets#2524

* try fix mamba install on windows

see conda-incubator/setup-miniconda#59

* fix pytest srouce path

* disable windows tests for now

Wait for conda-incubator/setup-miniconda#59

* add badge in readme for tests
@jaimergp jaimergp linked a pull request Nov 17, 2020 that will close this issue
@jaimergp
Copy link
Member

@AndrewAnnex this should be fixed in the next release. In the meantime, it seems that Bash on Windows requires the .bat extension, so you'd need to use mamba.bat install xxx. Next version includes a patch to workaround that requirement.

@AndrewAnnex
Copy link
Author

AndrewAnnex commented Nov 17, 2020 via email

@bollwyvl bollwyvl mentioned this issue Nov 19, 2020
8 tasks
@goanpeca goanpeca added this to the v2.0.1 milestone Nov 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants