Got an error to run humann2

218 views
Skip to first unread message

Minjae Kim

unread,
Aug 12, 2019, 10:19:05 AM8/12/19
to HUMAnN Users
Hi all
I installed humann2 on our cluster.
Briefly, I created a conda environment with python 2.7
and activate this environment and then install with "python setup.py install --prefix /account/mkim/Software/humann2_installation

I don't think I can use the pip install --user option for this cluster, because it cannot be run unless it is installed under /account/mkim/

While bowtie2 and diamond print help message after the installation, humann2 creates the following error messages

Traceback (most recent call last):
  File "./humann2", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/account/mkim/anaconda3/envs/humann2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3241, in <module>
    @_call_aside
  File "/account/mkim/anaconda3/envs/humann2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3225, in _call_aside
    f(*args, **kwargs)
  File "/account/mkim/anaconda3/envs/humann2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3254, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/account/mkim/anaconda3/envs/humann2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/account/mkim/anaconda3/envs/humann2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/account/mkim/anaconda3/envs/humann2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'humann2==2.8.1' distribution was not found and is required by the application

Do you have conda install option for humann2? Can you help me with this?
Thanks
Minjae

Lauren McIver

unread,
Aug 12, 2019, 3:39:19 PM8/12/19
to HUMAnN Users
Hi Minjae - Thank you for the detailed notes/error message. If you are installing humann2 in a conda environment you do not need the prefix or user flags since you should have permission to install in the default environment. I think the error you are seeing is because the humann2 executable is installed in your path but it can't find the location of the humann2 libraries. Try installing again without the prefix setting and it should resolve the issue you are seeing.

Thanks,
Lauren


--
You received this message because you are subscribed to the Google Groups "HUMAnN Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to humann-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/humann-users/8aa1fd59-9cdf-4af7-8a8f-d431b257c20f%40googlegroups.com.
Message has been deleted

Minjae Kim

unread,
Aug 12, 2019, 5:06:31 PM8/12/19
to HUMAnN Users
Hello Lauren
I just said that it seems work but I got an error again
The commandl line is  "humann2 --input ./examples/demo.fastq --output ../test_human/  --metaphlan /account/mkim/Software/biobakery-metaphlan2-0c3ed7b7718b/"

The error is the following

Output files will be written to: /account/mkim/Software/test_human
CRITICAL ERROR: Can not call software version for metaphlan2.py

For the installation of metaphlan2, I did
(1) Download and unpack metaphlan2
(2) under the same conda envrionment (humann2 environment), conda install bowtie2, conda install -c anaconda numpy, conda install -c anaconda pandas. (I did not install biom package since I don't need it).

When I try to see the help message from metaphlan2 it is working (I've never run it because I'm newly install this on new cluster).

Thanks a lot in advance!!
To unsubscribe from this group and stop receiving emails from it, send an email to humann...@googlegroups.com.

Lauren McIver

unread,
Aug 12, 2019, 5:19:41 PM8/12/19
to HUMAnN Users
Hi Minjae - Try running "$ metaphlan2.py --version". My guess is there might be a warning message about biom not being installed which causes humann2 to generate an error because it can't figure out the metaphlan2 version. If this is the case, install biom-format and that should resolve the issue.

Thanks,
Lauren

To unsubscribe from this group and stop receiving emails from it, send an email to humann-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/humann-users/ba610c3b-0b0c-4434-a146-06ed81b6fafc%40googlegroups.com.

Minjae Kim

unread,
Aug 13, 2019, 10:54:31 AM8/13/19
to HUMAnN Users
Thanks!
Test run worked!
Minjae
Reply all
Reply to author
Forward
0 new messages