Qiime2 ModuleNotFoundError with picrust2 plugin installation

#1

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:
https://library.qiime2.org/plugins/q2-picrust2/13/
(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!!

0 Likes

(Cara Fiore) #2

Hello,

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:
/Users/home/miniconda2/condabin/conda

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

0 Likes

(Nicholas Bokulich) #3

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

I am notifying the q2-picrust developer @gmdouglas

0 Likes

(Gavin Douglas) #4

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.

Gavin

0 Likes

(Cara Fiore) #5

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
0 Likes

(Gavin Douglas) #6

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?

Thanks

0 Likes

(Cara Fiore) #7

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:
/Users/home/miniconda2/envs/qiime2-2019.1/bin/python

Thank you for the help

0 Likes

(Gavin Douglas) #8

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

0 Likes

(Cara Fiore) #9

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