Irrationone / cellassign

Automated, probabilistic assignment of cell types in scRNA-seq data
Other
191 stars 79 forks source link

Wrong search path for tensorflow package #34

Closed jma1991 closed 4 years ago

jma1991 commented 5 years ago

The cellassign package requires tensorflow to be installed, however it does not search in the right environment for the tensorflow package. I first created a separate conda environment for the installation:

$ conda create --name cellassign r-cellassign r-tensorflow

Then when I try to run the cellassign function I get the following error:

> fit <- cellassign(sce, mat, s = sizeFactors(sce))
Error: Installation of TensorFlow not found.

Python environments searched for 'tensorflow' package:
 /home/jashmore/conda/bin/python3.6
 /usr/bin/python
 /usr/bin/python3.4

You can install TensorFlow using the install_tensorflow() function.

None of the Python environments searched contain the cellassign installation I created previously, even though R was started from within that environment. Not sure if this is an issue with the package itself or the conda recipe though?

Irrationone commented 5 years ago

Hi James,

That command won't actually install tensorflow -- it only installs the R interface to tensorflow (r-tensorflow) and cellassign.

You can choose to either install tensorflow in that environment with conda, or install tensorflow in a different conda environment using tensorflow::install_tensorflow. If you do the former you might have to run reticulate::use_condaenv to have it search the correct environment after starting up R.

kieranrcampbell commented 5 years ago

I wonder in light of this rather than the current

You can install TensorFlow using the install_tensorflow() function.

we should prompt the user too with "Would you like to install tensorflow now?" and call install_tensorflow() if the answer is yes?

Irrationone commented 5 years ago

Perhaps. I'm not sure what the best way forward is in handling choices for the install configuration (e.g. virtualenv vs. conda) though.

kieranrcampbell commented 4 years ago

As part of the bioconductor review process we've changed from auto-installing tensorflow to user control. Tentatively closing this issue

xiatianjihao commented 4 years ago

Hi all, I have the same problem and have installed tensorflow using the install_tensorflow() function, but the problem still existed. I have searched all the issues about this problem, but I can't found the perfect solutions. Did you have solved it ?

kieranrcampbell commented 4 years ago

Hi @xiatianjihao

We've been working on this to try and fix installation issues as part of a bioconductor submission. We now depend on the basilisk package in that build that should solve some of these issues.

Could you try

library(devtools)
install_github("LTLA/basilisk")
install_github("kieranrcampbell/cellassign") # <- note this is on my github and not allen's

and we'll see if that helps fix things? (it should at least help with tensorflow issues)

Thanks