RiboCode
RiboCode copied to clipboard
metaplot import error Python 3.10
Heads up that ribocode metaplot, and maybe other modules, break in python 3.10. Seems to be due to changes in collections library based on the stack overflow post. The help menu works again when I reinstall with python 3.9
Bug and easy fix:
metaplots --help
Traceback (most recent call last):
File "/gstore/home/malekose/micromamba/envs/test/bin/metaplots", line 6, in <module>
from RiboCode.metaplots import main
File "/gstore/home/malekose/micromamba/envs/test/lib/python3.10/site-packages/RiboCode/metaplots.py", line 16, in <module>
from .prepare_transcripts import *
File "/gstore/home/malekose/micromamba/envs/test/lib/python3.10/site-packages/RiboCode/prepare_transcripts.py", line 17, in <module>
from pyfasta import Fasta
File "/gstore/home/malekose/micromamba/envs/test/lib/python3.10/site-packages/pyfasta/__init__.py", line 3, in <module>
from pyfasta.fasta import Fasta, complement, DuplicateHeaderException
File "/gstore/home/malekose/micromamba/envs/test/lib/python3.10/site-packages/pyfasta/fasta.py", line 4, in <module>
from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections'
try: from collections.abc import Mapping except ImportError: from collections import Mapping
https://stackoverflow.com/questions/69381312/importerror-cannot-import-name-from-collections-using-python-3-10