Open pierfedericilucrezia opened 5 days ago
Hello,
I installed schist with conda. When I imported the package I had the following error: ---------------------------------------------------------------------------AttributeError Traceback (most recent call last) Cell In[66], line 1----> 1 import schist as scs 3 #scs.inference.fit_model(adata) File ~/.conda/envs/visium-env/lib/python3.11/site-packages/schist/init.py:1----> 1 from . import inference 2 from . import tools as tl 3 from . import plotting as pl File ~/.conda/envs/visium-env/lib/python3.11/site-packages/schist/inference/init.py:4 2 from ._flat_model import flat_model 3 from ._planted_model import planted_model----> 4 from ._pmleiden import leiden 5 from ._multi_nested import nested_model_multi File ~/.conda/envs/visium-env/lib/python3.11/site-packages/schist/inference/_pmleiden.py:45 29 except ImportError: 30 raise ImportError( 31 """Please install the graph-tool>=2.33 library either visiting 32 (...) 36 """ 37 ) 39 def leiden( 40 adata: AnnData, 41 resolution: float = 1, 42 n_init: int = 100, 43 *, 44 restrict_to: Optional[Tuple[str, Sequence[str]]] = None,---> 45 random_state: _utils.AnyRandom = 0, 46 key_added: str = 'leiden', 47 adjacency: Optional[sparse.spmatrix] = None, 48 directed: bool = True, 49 use_weights: bool = True, 50 n_iterations: int = -1, 51 partition_type: Optional[Type[MutableVertexPartition]] = None, 52 neighbors_key: Optional[str] = None, 53 obsp: Optional[str] = None, 54 collect_marginals: bool = True, 55 n_jobs: int = -1, 56 copy: bool = False, 57 save_model: Union[str, None] = None, 58 dispatch_backend: Optional[str] = 'threads', 59 **partitionkwargs, 60 ) -> Optional[AnnData]: 61 """\ 62 Cluster cells into subgroups [Traag18]. 63 (...) 136 and n_iterations. 137 """ 138 try: AttributeError: module 'scanpy._utils' has no attribute 'AnyRandom'
n_iterations
In my environment I have the version 1.10.2 of scanpy. I had no problem with the installation of schist by git. Thank you Lucrezia
What version of schist were you installing using conda? It seems to me this has been addressed in cf657f603b301b91986903cc29b193461be05dbc, so it should have been ok since v0.8.4.
Hello,
I installed schist with conda. When I imported the package I had the following error: ---------------------------------------------------------------------------AttributeError Traceback (most recent call last) Cell In[66], line 1----> 1 import schist as scs 3 #scs.inference.fit_model(adata) File ~/.conda/envs/visium-env/lib/python3.11/site-packages/schist/init.py:1----> 1 from . import inference 2 from . import tools as tl 3 from . import plotting as pl File ~/.conda/envs/visium-env/lib/python3.11/site-packages/schist/inference/init.py:4 2 from ._flat_model import flat_model 3 from ._planted_model import planted_model----> 4 from ._pmleiden import leiden 5 from ._multi_nested import nested_model_multi File ~/.conda/envs/visium-env/lib/python3.11/site-packages/schist/inference/_pmleiden.py:45 29 except ImportError: 30 raise ImportError( 31 """Please install the graph-tool>=2.33 library either visiting 32 (...) 36 """ 37 ) 39 def leiden( 40 adata: AnnData, 41 resolution: float = 1, 42 n_init: int = 100, 43 *, 44 restrict_to: Optional[Tuple[str, Sequence[str]]] = None,---> 45 random_state: _utils.AnyRandom = 0, 46 key_added: str = 'leiden', 47 adjacency: Optional[sparse.spmatrix] = None, 48 directed: bool = True, 49 use_weights: bool = True, 50 n_iterations: int = -1, 51 partition_type: Optional[Type[MutableVertexPartition]] = None, 52 neighbors_key: Optional[str] = None, 53 obsp: Optional[str] = None, 54 collect_marginals: bool = True, 55 n_jobs: int = -1, 56 copy: bool = False, 57 save_model: Union[str, None] = None, 58 dispatch_backend: Optional[str] = 'threads', 59 **partitionkwargs, 60 ) -> Optional[AnnData]: 61 """\ 62 Cluster cells into subgroups [Traag18]. 63 (...) 136 and
n_iterations
. 137 """ 138 try: AttributeError: module 'scanpy._utils' has no attribute 'AnyRandom'In my environment I have the version 1.10.2 of scanpy. I had no problem with the installation of schist by git. Thank you Lucrezia