Repository navigation
Open
Labels
bugSomething isn't working
Description
$ nextstrain update conda
Checking for newer versions of Nextstrain CLI…
A new version of nextstrain-cli, 10.2.0, is available! You're running 9.0.0.
See what's new in the changelog:
https://github.com/nextstrain/cli/blob/10.2.0/CHANGES.md#readme
Upgrade your Conda-based installation running:
mamba install -p /Users/cr/micromamba/envs/py12 nextstrain-cli==10.2.0
Updating conda runtime…
Updating Conda package nextstrain-base from None to 20250602T192245Z…
Updating Conda packages in /Users/cr/.nextstrain/runtimes/conda/env…
- nextstrain-base ==20250602T192245Z
Error running ('/Users/cr/.nextstrain/runtimes/conda/micromamba/bin/micromamba', '--root-prefix', '/Users/cr/.nextstrain/runtimes/conda/micromamba', '--no-rc', '--no-env', '--yes', 'update', 'nextstrain-base ==20250602T192245Z', '--prefix', '/Users/cr/.nextstrain/runtimes/conda/env', '--override-channels', '--strict-channel-priority', '--channel', 'nextstrain', '--channel', 'conda-forge', '--channel', 'bioconda', '--no-py-pin', '--allow-uninstall', '--allow-downgrade')
Traceback (most recent call last):
File "/Users/cr/micromamba/envs/py12/lib/python3.12/site-packages/nextstrain/cli/runner/conda.py", line 389, in micromamba
subprocess.run(argv, env = env, check = True)
File "/Users/cr/micromamba/envs/py12/lib/python3.12/subprocess.py", line 548, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cr/micromamba/envs/py12/lib/python3.12/subprocess.py", line 1026, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Users/cr/micromamba/envs/py12/lib/python3.12/subprocess.py", line 1955, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/cr/.nextstrain/runtimes/conda/micromamba/bin/micromamba'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/cr/micromamba/envs/py12/lib/python3.12/site-packages/nextstrain/cli/runner/conda.py", line 529, in update
micromamba("update", update_spec)
File "/Users/cr/micromamba/envs/py12/lib/python3.12/site-packages/nextstrain/cli/runner/conda.py", line 391, in micromamba
raise InternalError(f"Error running {argv!r}") from err
nextstrain.cli.errors.InternalError: Error running ('/Users/cr/.nextstrain/runtimes/conda/micromamba/bin/micromamba', '--root-prefix', '/Users/cr/.nextstrain/runtimes/conda/micromamba', '--no-rc', '--no-env', '--yes', 'update', 'nextstrain-base ==20250602T192245Z', '--prefix', '/Users/cr/.nextstrain/runtimes/conda/env', '--override-channels', '--strict-channel-priority', '--channel', 'nextstrain', '--channel', 'conda-forge', '--channel', 'bioconda', '--no-py-pin', '--allow-uninstall', '--allow-downgrade')
Updating failed!
Maybe upgrading Nextstrain CLI, as noted above, will help?
PR fails due to action timeout, seems like there's a problem with the build:
Metadata
Metadata
Assignees
Labels
bugSomething isn't working
Activity
joverlee521 commentedon Jun 4, 2025
The line
Updating Conda package nextstrain-base from None to 20250602T192245Z…and theFileNotFoundErrorimply that the conda runtime is not set up yet.@corneliusroemer Did you already run
nextstrain setup condaor try runningnextstrain setup conda --force?victorlin commentedon Jul 2, 2025
As @joverlee521 hints, the error is not is due to a missing version of CLI on Bioconda. 10.2.0 is now available on bioconda so I'm going to remove that part from the issue title to avoid confusion.
I'm able to reproduce the same error with
nextstrain update condafrom a fresh install of Nextstrain CLI version 9.0.0, so the issue is thatnextstrain setup condahas not been run yet. This can be easily detected, and the error message should be improved.Note that the error is different on version 10.2.0, though it could also be improved:
[-]`nextstrain update conda` fails due to cli v10.2.0 not being available via bioconda[/-][+]`nextstrain update conda` fails when runtime has not been set up[/+]victorlin commentedon Jul 3, 2025
Oh, I now realize there are 2 issues here, the 2nd one being that the Conda-based installation gives a bad hint:
This is because there is a lag between when a new version is detectable (i.e. available in PyPI) and when it can be Conda installed (i.e. Bioconda PR merged and package built). For 10.2.0 this lag was nearly 2 months, but that's a one-off and typically it's a day or two. We could update the latest version detection for Conda-based installations, but I'm not sure it's worth the extra hassle.