GilbertLabUCSF / CanDI

CanDI - A global cancer data integrator
http://candi.rtfd.io/
MIT License
6 stars 4 forks source link

`ImportError` in python v3.10 #31

Closed abearab closed 9 months ago

abearab commented 1 year ago

Python 3.9:

Python 3.9.16 | packaged by conda-forge | (main, Feb  1 2023, 21:39:03) 
[GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from collections import OrderedDict, MutableSequence
<stdin>:1: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working

Python 3.10:

ImportError                               Traceback (most recent call last)
Cell In [3], line 5
      1 import sys
      3 sys.path.append('/data_gilbert2/backups/aarab/CanDI')
----> 5 from CanDI import candi as can

File /data_gilbert2/backups/aarab/CanDI/CanDI/candi/__init__.py:3
      1 from CanDI.candi import data
      2 data = data.Data() #Global object data instantiated on import required for access by GeneQuery Objects
----> 3 from CanDI.candi.candi import (Gene, CellLine, Organelle, Cancer, CellLineCluster, GeneCluster)

File /data_gilbert2/backups/aarab/CanDI/CanDI/candi/candi.py:3
      1 # Classes for handling data aggregations
      2 import operator
----> 3 from collections import OrderedDict, MutableSequence
      4 import itertools as it
      5 import pandas as pd

ImportError: cannot import name 'MutableSequence' from 'collections' (/data_gilbert/home/aarab/anaconda3/envs/cgat/lib/python3.10/collections/__init__.py)
abearab commented 1 year ago

this might be the answer https://stackoverflow.com/questions/68468088/how-to-implement-mutablesequence-on-custom-class