Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metaplot import error Python 3.10 #64

Open
ericmalekos opened this issue Jun 23, 2024 · 0 comments
Open

metaplot import error Python 3.10 #64

ericmalekos opened this issue Jun 23, 2024 · 0 comments

Comments

@ericmalekos
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant