Strainphlan no module named cmseq

Thanks for these awesome tools.
my code: -i /home/ep189/strainer_tutorial/sams/*.sam.bz2 -o /home/ep189/strainer_tutorial/consensus_markers -n 8

the error I got:
Traceback (most recent call last):
File “/home/ep189/.local/bin/”, line 11, in
load_entry_point(‘MetaPhlAn==3.0.0a1’, ‘console_scripts’, ‘’)()
File “/usr/lib/python3.6/site-packages/pkg_resources/”, line 476, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/usr/lib/python3.6/site-packages/pkg_resources/”, line 2700, in load_entry_point
return ep.load()
File “/usr/lib/python3.6/site-packages/pkg_resources/”, line 2318, in load
return self.resolve()
File “/usr/lib/python3.6/site-packages/pkg_resources/”, line 2324, in resolve
module = import(self.module_name, fromlist=[‘name’], level=0)
File “/home/ep189/.local/lib/python3.6/site-packages/metaphlan/utils/”, line 24, in
from cmseq import cmseq
ModuleNotFoundError: No module named ‘cmseq’

I tried reinstalling cmseq with conda, but no luck. I installed metaphlan 3.0 with conda.
Any other suggestions? Thanks so much.

Hi @eperez
Could you please run the following commands and send me the results:
$ metaphlan -v
$ -h
$ ls /home/ep189/.local/lib/python3.6/site-packages/cmseq


Dear Aitor,
Here’s the results:

Warning! Biom python library not detected!
Exporting to biom format will not work!
MetaPhlAn version 3.0 (20 Mar 2020)

-bash: command not found

ls: cannot access /home/ep189/.local/lib/python3.6/site-packages/cmseq: No such file or directory

That’s odd… I know I installed cmseq but maybe there’s some other issue with python?
I’m on a cluster with python installed as a module for all users and I wonder if python on the module system is what metaphlan/strainphlan keeps referring to…!
Thanks for your help.

Hi @eperez
Yes, that means cmseq was not installed correctly. Moreover, the MetaPhlAn version is quite old (the latest version is 3.0.7 (09 Dec 2020)).
For having a better idea about the problem, could you run:
$ whereis metaphlan
$ whereis

Hi Aitor,

Ah, I see. I relatively recently installed with Conda, but I guess there have been some version updates since then! Will definitely try re-installing and then run those commands to see where it installs it and where the script is.
I did some digging, and yes, my metaphlan script locations were all messed up. I think for whatever reason an older version of Python I had on my directory caused the installations to go to randomly different folders. I’m going to start from scratch and re-install everything, including removing any other versions of python from my directory since it seems to be contributing to the problem.

I’ll get back about how the new installation goes after the holidays and send a reply with the outputs in this thread.
Thanks so much!

Hi @eperez
Sure, Let us know!

Dear Aitor,

Just following up on this old thread,
I went to attempt to install the latest version on conda, and it looks like the version available on conda is still 3.0. I tried auto-updating with conda update, but I get an error that the package is not installed in prefix (yet, I see it is there…)
Apologies, I’m new to doing things with conda and using biobakery tools. So, I’ve reinstalled metaphlan, but it is still 3.0. Any suggestions? -h
command not found

ls /home/ep189/.local/lib/python3.6/site-packages/cmseq
ls: cannot access /home/ep189/.local/lib/python3.6/site-packages/cmseq: No such file or directory
^^ I got the above error after trying to install cmseq with conda as well.

whereis metaphlan
metaphlan: /home/ep189/.local/bin/metaphlan

sample2markers: /home/ep189/.local/bin/

I guess the good news is that now is in the right place, but now it my terminal doesn’t detect cmseq.

Anything helps! Thanks

Hi Elizabeth,
Can you try installing MetaPhlAn in a new and separate environment? You can run conda create --name mpa -c bioconda python=3.7 metaphlan and then activate it with conda activate mpa

Dear Francesco,

Thank you! I am moving to another computing cluster with the programs installed already where I can access them as well (hallelujah!) and will not be needing help anymore - but, I will say that it seems that was my problem. When I checked inside the folders from installation, I think they had gone to a wrong environment, but making a new environment probably would have solved it! Thank you so much for your help!

1 Like