jingshuw / SAVERX

R package for transfer learning of single-cell RNA-seq denoising
29 stars 9 forks source link

Error in importing sctransfer #22

Open zhli12 opened 3 years ago

zhli12 commented 3 years ago

Hi,

When running the example file <- saverx("./testdata/shekhar_downsampled.csv"), I encountered the error saying

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

I know there is a related post here, https://github.com/jingshuw/SAVERX/issues/15. I tried its solution, but it didn't work for me.

My Python version is Python 3.8.5, and I double-checked that sctransfer has been installed:

Name: sctransfer
Version: 0.0.9
Summary: Python part for scRNA-seq transfer learning denoising tool SAVER-X
Home-page: https://github.com/jingshuw/sctransfer
Author: Jingshu Wang
Author-email: wangjingshususan@gmail.com
License: GPL-3
Location: /Users/zhli12/miniconda3/lib/python3.8/site-packages
Requires: pandas, anndata, scikit-learn, numpy, h5py, six, keras, scanpy, tensorflow

Based on its installation location, I also tried the command

path_to_python <- "Users/zhli12/miniconda3/lib/python3.8"
use_python(path_to_python)

However, the same error persists.

Does anyone know how to fix this problem? Thank you!!

tinachen34 commented 1 year ago

I'm also having the same problem, and the solution for #15 also didn't work for me. I can see the sctransfer module in Users/tina/Library/Python/3.7/lib/python/sitepackages, but from py_config() I can see that the python being used is /Users/tina/Library/r-miniconda/envs/r-reticulate/bin/python.

I tried using

path_to_python <- "/Users/tina/Library/python/3.7/lib" 
use_python(path_to_python)

as well as path_to_python <- "/Users/tina/Library/python/3.7" but have been encountering errors with both. Am I perhaps using the commands wrong? Would also appreciate any advice!