liulab-dfci / MAESTRO

Single-cell Transcriptome and Regulome Analysis Pipeline
GNU General Public License v3.0
276 stars 76 forks source link

ModuleNotFoundError: No module named 'tables' on 1.3.1 #116

Closed f6v closed 3 years ago

f6v commented 3 years ago

I'm running R code to calculate the gene scores from ATAC data and running into the issue which already has been described: https://github.com/liulab-dfci/MAESTRO/issues/61

Here's my code:

atac_counts = # A data frame with loci in rows and cells in columns
gene_scores <- ATACCalculateGenescore(atac_counts, organism = "GRCh38")

I get the following error:

Error in py_run_file_impl(file, local, convert) : 
 ModuleNotFoundError: No module named 'tables'
Detailed traceback: 
File "<string>", line 10, in <module>
File "/kyukon/data/gent/vo/000/gvo00027/multimodal_omics_GRN/maestro_env/lib/R/library/reticulate/python/rpytools/loader.py", line 19, in _import_hook
 module = _import(
Calls: ATACCalculateGenescore -> source_python -> py_run_file -> py_run_file_impl

I installed MAESTRO through conda. pytables 3.6.1 seems to be installed in the environment(if that's the package in question). Am I missing something?

Thanks!

baigal628 commented 3 years ago

Hi!

If you run library(reticulate) use_python("~/miniconda2/envs/MAESTRO_1.3.2/bin/python3.8",required = TRUE) and try: import("tables")

If the module loaded successfully, it should be fixed.

f6v commented 3 years ago

@baigal628 thanks! That works.

Yijia-Jiang commented 2 years ago

Hi Gali,

I tried reticulate to install miniconda in R, and run ATACCalculateGenescore function. However, error shows below:

Error in py_module_import(module, convert = convert) : ModuleNotFoundError: No module named 'tables'

I tried "import('tables') above, but error persists: ModuleNotFoundError: No module named 'tables'.

YuqingMei commented 1 year ago

On Ubuntu, I solved this problem using this command:

sudo apt-get install python3-tables