KrishnaswamyLab / phateR

PHATE dimensionality reduction method implemented in R
GNU General Public License v2.0
77 stars 9 forks source link

Module not found error #66

Closed zincfingers89 closed 1 year ago

zincfingers89 commented 1 year ago

Hi there!

Im trying to install PhateR on Rstudio R 4.2.1 currently using macOS Monterey using > devtools::install_github("KrishnaswamyLab/phateR", ref="dev")

which seems to have worked as the output is below:

"Skipping install of 'phateR' from a github remote, the SHA1 (e72ec70a) has not changed since last install. Use force = TRUE to force installation"

However I still cannot get the module to load getting error:

library(phateR) tree.phate <- phate(tree.data$data) Error in py_module_import(module, convert = convert) : ModuleNotFoundError: No module named 'phate'

Error in pyphate()$PHATE : $ operator is invalid for atomic vectors

having looked at some similar issues I have gone through some potential fixes (following herehttps://github.com/KrishnaswamyLab/phateR/issues/22) but still I cannot get past it

The output of > reticulate::py_discover_config("phate") python: /Users/kj15161/Library/r-miniconda/envs/r-reticulate/bin/python libpython: /Users/kj15161/Library/r-miniconda/envs/r-reticulate/lib/libpython3.8.dylib pythonhome: /Users/kj15161/Library/r-miniconda/envs/r-reticulate:/Users/kj15161/Library/r-miniconda/envs/r-reticulate version: 3.8.15 | packaged by conda-forge | (default, Nov 22 2022, 08:53:40) [Clang 14.0.6 ] numpy: /Users/kj15161/Library/r-miniconda/envs/r-reticulate/lib/python3.8/site-packages/numpy numpy_version: 1.24.1

and in terminal

which python /opt/anaconda3/bin/python

Any help appreciated, Thanks again, Katy

zincfingers89 commented 1 year ago

Ok I may have solved my own issue here:

I have added the following line to ~/.Renviron:

PATH=/opt/anaconda3/bin/python

and found this path by typing R.home() into R

and all looks well. Sorry to bother folk, but though this could still be useful for others.

Katy