I am a QIIME2 user, up to now I used it on Linux Virtual Box and also on MacOs Mojave without any problem. I am now working on a computer with MacOs Catalina 10.15.7. I apparently installed Minconda and QIIME2 (2021.2). Installation seemed to be succesfull: with "conda activate qiime2-2021.2", conda environment is apparently activated and I apparently enter QIIME2. When listing the directories, both conda and QIIME2 appear as present and installed. Nevertheless, no script seems to run (not even the simplest "qiime --help"). I always get the error "zsh: command not found: qiime".
Can anybody help? Thank you very much!
Welcome to the Forum! I'm not part of the official QIIME 2 team, but I had a similar issue when I updated my MacOS to Catalina. Basically, the problem is, starting with Catalina, Apple changed the default shell from bash to zsh, and that's what's causing the problem with Anaconda. This can be easily fixed by configuring your conda profile to zsh, as described in this StackOverflow post:
If you are on macOS Catalina , the new default shell is zsh. You will instead need to run source <path to conda>/bin/activate followed by conda init zsh .
thank you very much! I already tried that. Here's my home user directories:
(base) claudia@Mac-mini-di-Claudia ~ % ls
--i-data CytoscapeConfiguration
--i-table Desktop
--i-taxonomy Documents
--input-path Downloads
--o-collapsed-table Library
--o-visualization Movies
--output-path Music
--p-level Pictures
--to-tsv Public
-i miniconda3
-o qiime2-2021.2-py36-osx-conda.yml
Applications
I tried following the recommendation, but I got "no action taken":
(base) claudia@Mac-mini-di-Claudia ~ % source miniconda3/bin/activate
(base) claudia@Mac-mini-di-Claudia ~ % conda init zsh
no change /Users/claudia/miniconda3/condabin/conda
no change /Users/claudia/miniconda3/bin/conda
no change /Users/claudia/miniconda3/bin/conda-env
no change /Users/claudia/miniconda3/bin/activate
no change /Users/claudia/miniconda3/bin/deactivate
no change /Users/claudia/miniconda3/etc/profile.d/conda.sh
no change /Users/claudia/miniconda3/etc/fish/conf.d/conda.fish
no change /Users/claudia/miniconda3/shell/condabin/Conda.psm1
no change /Users/claudia/miniconda3/shell/condabin/conda-hook.ps1
no change /Users/claudia/miniconda3/lib/python3.8/site-packages/xontrib/conda.xsh
no change /Users/claudia/miniconda3/etc/profile.d/conda.csh
no change /Users/claudia/.zshrc
No action taken.
QIIME2 scripts do not work yet. Any suggestion? Thank you!
Last login: Wed Mar 17 09:44:16 on ttys002
(base) claudia@Mac-mini-di-Claudia ~ % source miniconda3/bin/activate
(base) claudia@Mac-mini-di-Claudia ~ % conda init zsh
no change /Users/claudia/miniconda3/condabin/conda
no change /Users/claudia/miniconda3/bin/conda
no change /Users/claudia/miniconda3/bin/conda-env
no change /Users/claudia/miniconda3/bin/activate
no change /Users/claudia/miniconda3/bin/deactivate
no change /Users/claudia/miniconda3/etc/profile.d/conda.sh
no change /Users/claudia/miniconda3/etc/fish/conf.d/conda.fish
no change /Users/claudia/miniconda3/shell/condabin/Conda.psm1
no change /Users/claudia/miniconda3/shell/condabin/conda-hook.ps1
no change /Users/claudia/miniconda3/lib/python3.8/site-packages/xontrib/conda.xsh
no change /Users/claudia/miniconda3/etc/profile.d/conda.csh
no change /Users/claudia/.zshrc
No action taken.
(base) claudia@Mac-mini-di-Claudia ~ %
Then I opened a new shell and ran
Last login: Wed Mar 17 09:45:00 on ttys000
(base) claudia@Mac-mini-di-Claudia ~ % conda activate qiime2-2021.2
(qiime2-2021.2) claudia@Mac-mini-di-Claudia ~ % qiime info
zsh: command not found: qiime
(qiime2-2021.2) claudia@Mac-mini-di-Claudia ~ %
So, it seems it's still not working. It looks like we did not manage to get out from zsh. Did I miss anything? Thank you very much!
Just one info more: I installed miniconda and QIIME2 with the computer already working in Catalina. Perhaps I should change the shell from zsh to bash and then try to re-install conda and qiime?
It sounds like there might be some crossed wires in this computer's current conda configuration - please run the following commands (with no conda environments activated):
env
and
conda env list
and
conda list -n qiime2-2021.2
Please copy and paste the complete results from each command here.
Please paste into a "command block":
```
your pasted code or output here
```
This will ensure the output is formatted correctly.
Thanks!
PS - zsh vs bash shouldn't really matter here - let's sort it out with the current shell you have set up!
Thanks @claudia.vannini! Do you see the last command you shared, the conda list -n qiime2-2021.2 command? There should be ~100 lines of packages there, including all of the qiime2 packages, but you have none. This kind of thing can happen if your network fails, or you shut down/sleep your computer while installing, etc.
You can try removing the QIIME 2 2021.2 conda env, and reinstalling:
thanks a lot!! I followed your instructions for removing qiime2, than I re-installed and it seems now it works!
Thank you really very much for your precious help!
Just one thing more: when I enter qiime2, I get a message of one command not found. I tried several qiime2 commands and they all seem to work, so this is just because Iām curious. I copy everything here:
Last login: Thu Mar 25 10:34:40 on ttys000
(base) claudia@Mac-mini-di-Claudia ~ % conda activate qiime2-2021.2
complete:13: command not found: compdef
(qiime2-2021.2) claudia@Mac-mini-di-Claudia ~ %
Hi @claudia.vannini, glad to hear you got things working. The compdef error implies that you're using a different shell than the one that you have configured with miniconda - for example, you configured miniconda to use bash, but are currently using zsh. This isn't a real problem, it will just prevent you from being able to tab-complete commands (which is pretty annoying).
We can try to pinpoint things, this will take a few round-trip discussions here though. Round 1, please run the following and share the results here:
(Processo completato=process completed)
Then, if I close, open again a new terminal and try to enter qiime2, it does not work any longer!! I am no longer able to enter the environment:
Last login: Fri Mar 26 17:04:12 on ttys000
claudia@Mac-mini-di-Claudia ~ % /Users/claudia/miniconda3/bin/conda init zsh
exit
no change /Users/claudia/miniconda3/condabin/conda
no change /Users/claudia/miniconda3/bin/conda
no change /Users/claudia/miniconda3/bin/conda-env
no change /Users/claudia/miniconda3/bin/activate
no change /Users/claudia/miniconda3/bin/deactivate
no change /Users/claudia/miniconda3/etc/profile.d/conda.sh
no change /Users/claudia/miniconda3/etc/fish/conf.d/conda.fish
no change /Users/claudia/miniconda3/shell/condabin/Conda.psm1
no change /Users/claudia/miniconda3/shell/condabin/conda-hook.ps1
no change /Users/claudia/miniconda3/lib/python3.8/site-packages/xontrib/conda.xsh
no change /Users/claudia/miniconda3/etc/profile.d/conda.csh
modified /Users/claudia/.zshrc
==> For changes to take effect, close and re-open your current shell. <==
[Processo completato]
Then I closed, re-open the terminal and tryed again to enter qiime2:
Last login: Fri Mar 26 17:04:23 on ttys000
(base) claudia@Mac-mini-di-Claudia ~ % conda activate qiime2-2021.2
complete:13: command not found: compdef
(qiime2-2021.2) claudia@Mac-mini-di-Claudia ~ %
Now I am again able to enter qiime2, thanks!! (but still get the misterious "command not found: compdef")
Anyway, qiime2 is working, which is the important thing!!
Thank you really so much!
Somewhere your computer is trying to load more than one different shell, which is causing this "compdef" issue. I'm not really sure where or how it is happening, but if you can work with your local tech support to resolve it that would be best, I don't think there is anything else we can do here. Keep us posted!
thank you really very much for your fundamental help! I'll try to fix the "compdef" issue with technical support here, anyway this does not seem really important (tab-complete commands are not essential to me).
Thanks again!