Qiime2 ModuleNotFoundError with picrust2 plugin installation

Hello everyone,

I’m completely new to Qiime2 so I apologize if this question has an obvious answer. I am currently using Qiime2 2019.1 using VirtualBox as my computer has a Windows OS. I have been trying to install the picrust2 plugin but keep getting an error despite multiple attempts. I am using the instructions provided at:
(also copied below):

  1. These instructions will assume you have a conda environment named qiime2-2019.1 installed. Activate this environment :
source activate qiime2-2019.1
  1. Download and install PICRUSt2 :
wget https://github.com/picrust/picrust2/releases/download/v2.0.3-b/picrust2-2.0.3-b.zip
unzip picrust2-2.0.3-b.zip
cd picrust2-2.0.3-b
conda-env update -n qiime2-2019.1 -f picrust2-env.yaml
pip install --editable .
  1. Test the installation :
pytest tests/test_hsp.py tests/test_metagenome_pipeline.py tests/test_run_minpath.py tests/test_util.py
  1. Download the q2-picrust2 plugin GitHub Repo and install.
cd ..
wget https://github.com/gavinmdouglas/q2-picrust2/releases/download/v0.0.2/q2-picrust2-0.0.2.zip
unzip q2-picrust2-0.0.2.zip
cd q2-picrust2-0.0.2
python setup.py install
qiime dev refresh-cache
cd ..

When I then move on to working through the picrust2 running tutorial
https://github.com/picrust/picrust2/wiki/q2-picrust2-Tutorial I end up getting an error message: ModuleNotFoundError: No module named ‘picrust2’
I have tried this about 5 times and cannot seem to figure out where I’m going wrong. Any advice would be much appreciated!!


I am trying to install the picrust plugin for qiime2. It is very straightforward so I hate to even ask here but I am getting an error that I am so far unable to troubleshoot using this and other forums.

I have qiime2 installed using miniconda (Mac) and I can activate it using ‘source’:
$ source activate qiime2-2019.1

But I get this error on this last time I activated (I don’t think I’ve seen this before trying to install the plugin but maybe I just don’t remember. I have used qiime2 just fine on this computer before.):

ModuleNotFoundError: No module named ‘picrust2’

Then I followed the install instructions for the q2 plugin which first installs picrust:

wget https://github.com/picrust/picrust2/releases/download/v2.0.3-b/picrust2-2.0.3-b.zip
unzip picrust2-2.0.3-b.zip
cd picrust2-2.0.3-b
conda-env update -n qiime2-2019.1 -f picrust2-env.yaml

However, the last command gives me this error:
-bash: conda-env: command not found

When I type ‘which conda’ I get this:

Is there something else I need to do with my path or is this something else? Thank you for your time.

Hi @clfiore @m7474 I merged these posts because you are both having the same problem.

I am notifying the q2-picrust developer @gmdouglas

Hi @clfiore @m7474,

I can’t be sure exactly what the issues are here, but I can give some suggestions for troubleshooting.

@m7474 - When do you get the error “ModuleNotFoundError: No module named ‘picrust2’”? Can you run “metagenome_pipeline.py --help” after installing PICRUSt2 above? Can you confirm that you’re running the “pip install --editable .” command and not getting an error when installing PICRUSt2?

@clfiore - Can you confirm that you successfully installed PICRUSt2 or not (instructions under #2 here: https://library.qiime2.org/plugins/q2-picrust2/13/) before installing q2-picrust2? Similar to the above you could test this by running “metagenome_pipeline.py --help”. I ask because you would get this error if PICRUSt2 was not already installed when installing the plugin (which requires additional commands to those that you posted).

I’m currently improving the q2-picrust2 installation so that these sorts of issues hopefully wont come up, which should be live in a day or two.


Hi Gavin

Thank you for the quick reply.

I did run: metagenome_pipeline.py --help
And I got the following error (so must not be installed?):

-bash: metagenome_pipeline.py: command not found

However, I did follow the instructions for installing (using the same link as you posted) previously and just now and it looks like it downloads and installs OK. I do not get an error from any of these commands:

wget https://github.com/picrust/picrust2/releases/download/v2.0.3-b/picrust2-2.0.3-b.zip
unzip picrust2-2.0.3-b.zip
cd picrust2-2.0.3-b

Hi @clfiore

Just to be clear, you’re also running the below two commands after those first three right (including the “.” in the pip command?). You may have to paste the commands in one-by-one.

conda-env update -n qiime2-2019.1 -f picrust2-env.yaml
pip install --editable .

If the command still isn’t found after that could you type:
which python

And report what is returned?


Yes, that is correct- although because I got an error with “conda-env update” I did not move on to the next command of “pip install”. The error with “conda-env update” is what prompted my question. This command:
conda-env update -n qiime2-2019.1 -f picrust2-env.yaml

When I type “which python” this is what i get:

Thank you for the help

What version of conda are you using and does running “conda env” instead of “conda-env” work?

Wow. That seems to have worked! I wish I had thought of trying that on my own but thank you so much for your help!

1 Like

Hi everyone!
I am not sure whether is correct to post this here or in a new thread. I am trying to install the picrust2 plugin in qiime2 2019.10. I have been using the same instructions as @m7474. everything seems to be fine until I run the test. I have attached the results of the test picrust2_installation_test.txt (38.2 KB)
As you can see the test shows 10 failed, 30 passed and 2 warnings. I am very new to qiime and bioinformatics in general and have no clue what does this means and how can I fixed the errors. I would appreciate if you guys could give me a hand with this. Thanks!

I just discovered the mistake, when I paste the code conda-env update, I forgot to change from 2019.1 to 2019.10
I have now reran the test and the errors are gone!