earmingol / cell2cell

User-friendly tool to infer cell-cell interactions and communication from gene expression of interacting proteins
BSD 3-Clause "New" or "Revised" License
55 stars 12 forks source link

Conflict to install cell2cell #56

Closed Capiques closed 1 month ago

Capiques commented 3 months ago

Hello,

I meet a conflict when I want to install cell2cell. Im not able to import it because during the import the module name import lib.metadata is not find. I tried to install this module on the side with pip

Requirement already satisfied: importlib.metadata in /home/miniconda3/envs/cell2cell/lib/python3.7/site-packages (4.11.3) Requirement already satisfied: zipp>=0.5 in /home/miniconda3/envs/cell2cell/lib/python3.7/site-packages (from importlib.metadata) (3.11.0) Requirement already satisfied: typing-extensions>=3.6.4 in /home/miniconda3/envs/cell2cell/lib/python3.7/site-packages (from importlib.metadata) (4.4.0)

but I still have this error

`ModuleNotFoundError Traceback (most recent call last) /tmp/ipykernel_3722822/3261411870.py in ----> 1 import cell2cell as c2c 2 import scanpy as sc 3 import pandas as pd 4 5 get_ipython().run_line_magic('matplotlib', 'inline')

~/miniconda3/envs/cell2cell/lib/python3.7/site-packages/cell2cell/init.py in 1 # -- coding: utf-8 -- 2 ----> 3 from cell2cell import analysis 4 from cell2cell import clustering 5 from cell2cell import core

~/miniconda3/envs/cell2cell/lib/python3.7/site-packages/cell2cell/analysis/init.py in 1 from cell2cell.analysis.cell2cell_pipelines import (initialize_interaction_space, BulkInteractions, SingleCellInteractions) ----> 2 from cell2cell.analysis.tensor_pipelines import (run_tensor_cell2cell_pipeline) 3 import cell2cell.analysis.tensor_downstream as tensor_downstream 4

~/miniconda3/envs/cell2cell/lib/python3.7/site-packages/cell2cell/analysis/tensor_pipelines.py in 5 import tensorly as tl 6 ----> 7 from cell2cell.plotting.tensor_plot import tensor_factors_plot 8 9

~/miniconda3/envs/cell2cell/lib/python3.7/site-packages/cell2cell/plotting/init.py in 5 from cell2cell.plotting.pval_plot import (dot_plot, generate_dot_plot) 6 from cell2cell.plotting.factor_plot import (context_boxplot, loading_clustermap, ccc_networks_plot) ----> 7 from cell2cell.plotting.pcoa_plot import (pcoa_3dplot) 8 from cell2cell.plotting.tensor_plot import (tensor_factors_plot, tensor_factors_plot_from_loadings) 9 from cell2cell.plotting.umap_plot import (umap_biplot)

~/miniconda3/envs/cell2cell/lib/python3.7/site-packages/cell2cell/plotting/pcoa_plot.py in 6 from mpl_toolkits.mplot3d import Axes3D 7 ----> 8 from cell2cell.external import pcoa, _check_ordination 9 from cell2cell.plotting.aesthetics import get_colors_from_labels 10

~/miniconda3/envs/cell2cell/lib/python3.7/site-packages/cell2cell/external/init.py in 2 from cell2cell.external.goenrich import (goa, ontology) 3 from cell2cell.external.gseapy import (load_gmt, generate_lr_geneset, run_gsea) ----> 4 from cell2cell.external.umap import (run_umap)

~/miniconda3/envs/cell2cell/lib/python3.7/site-packages/cell2cell/external/umap.py in 1 # -- coding: utf-8 -- ----> 2 import umap 3 4 import pandas as pd 5 import scipy.spatial as sp

~/miniconda3/envs/cell2cell/lib/python3.7/site-packages/umap/init.py in 34 import numba 35 ---> 36 from importlib.metadata import version, PackageNotFoundError 37 38 try:

ModuleNotFoundError: No module named 'importlib.metadata'`

Do you have an idea of what can I do ?

Thanks !!

earmingol commented 3 months ago

Hi! this issue seems to be associated with the version of the tool umap (https://github.com/lmcinnes/umap). You can try creating an environment following the instructions here: https://github.com/saezlab/ccc_protocols/tree/main/env_setup

Capiques commented 3 months ago

Thank you!!