Augur not found despite having installed Nextstrain CLI

This question was originally submitted by a user via email

I’ve successfully installed Nextstrain CLI. But now, when I try to run an augur command, it doesn’t work:

$ augur filter --sequences seq.fasta --exclude exclude.txt --metadata meta.csv --output out.fasta
zsh: command not found: augur

I also can’t activate the nextstrain environment using conda:

$ conda activate nextstrain
EnvironmentNameNotFound: Could not find conda environment: nextstrain
You can list all discoverable environments with 'conda info --envs`.

It looks like something is wrong with my PATH:

$ echo $PATH
/Users/redacted/miniconda3/bin:/Users/redacted/miniconda3/condabin:/Users/redacted/.nextstrain/cli-standalone:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

When you install the “managed conda” runtime using Nextstrain CLI, this doesn’t put “augur” in your path. That’s on purpose to not mess with any other conda installations you may have on your system.

There is one recommended and two non-recommended (brittle) ways of using the managed conda runtime to run individual augur commands:

  1. Recommended: you can use the nextstrain shell --conda . command, this will open a special shell which has ~/.nextstrain/runtimes/conda/env/bin/ already in your path

  2. Not recommended: You can add ~/.nextstrain/runtimes/conda/env/bin/ to your path

  3. Not recommended: Instead of typing augur filter... you could specify the exact binary: ~/.nextstrain/runtimes/conda/env/bin/augur filter...

Of the 3 options @corneliusroemer lists, only option 1 is recommended.

Options 2 and 3 could stop working in the future if the internal path used by Nextstrain CLI for the Conda runtime changes (e.g. is no longer ~/.nextstrain/runtimes/conda/env/bin/).

[Edited to update option numbering since the original post was changed.]

1 Like