biobakery / phylophlan

Precise phylogenetic analysis of microbial isolates and genomes from metagenomes
https://huttenhower.sph.harvard.edu/phylophlan
MIT License
128 stars 33 forks source link

AttributeError: module 'collections' has no attribute 'MutableMapping' #96

Closed Guan06 closed 2 years ago

Guan06 commented 2 years ago

Hi,

I installed phylophlan 3.0 from bioconda, and tried to download the databases via:

_phylophlan -d phylophlan --databasesfolder ./

But got error message as below: Traceback (most recent call last): File "/home/.conda/envs/phylophlan/bin/phylophlan", line 7, in from phylophlan.phylophlan import phylophlan_main File "/home/.conda/envs/phylophlan/lib/python3.10/site-packages/phylophlan/phylophlan.py", line 34, in import dendropy File "/home/.conda/envs/phylophlan/lib/python3.10/site-packages/dendropy/init.py", line 25, in from dendropy.dataio.nexusprocessing import get_rooting_argument File "/home/.conda/envs/phylophlan/lib/python3.10/site-packages/dendropy/dataio/init.py", line 21, in from dendropy.dataio import newickreader File "/home/.conda/envs/phylophlan/lib/python3.10/site-packages/dendropy/dataio/newickreader.py", line 30, in from dendropy.dataio import nexusprocessing File "/home/.conda/envs/phylophlan/lib/python3.10/site-packages/dendropy/dataio/nexusprocessing.py", line 31, in from dendropy.utility import container File "/home/.conda/envs/phylophlan/lib/python3.10/site-packages/dendropy/utility/container.py", line 357, in class CaseInsensitiveDict(collections.MutableMapping): AttributeError: module 'collections' has no attribute 'MutableMapping'

I think it is due to the python version, that in python 3.10, the attribute MutableMapping from the module collections have been removed, but don't know how to fix this problem though..

Many thanks and best, Rui

fasnicar commented 2 years ago

Dear Rui, many thanks for reporting this. You can downgrade your python in the phylophlan conda env to a version <3.10. For instance, conda install python=3.8

Many thanks, Francesco

Guan06 commented 2 years ago

Thanks very much, this fixed the problem! Sorry.. forget to close the issue earlier..

Best, Rui