Irrationone / cellassign

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

Problem to install cellassign using devtools. #48

Closed VicenteFR closed 4 years ago

VicenteFR commented 4 years ago

Hi! Trying to figure out why I can't install cellassign from GitHub using devtools. As specified, I've already installed tensor flow with install.packages() and applied tensorflow::install_tensorflow(), where I've specified the specific path where I want it to be saved (a directory for my R 3.6 version packages directory, this for both). Then, after trying install_github("Irrationone/cellassign"), I get this error:

Error: package or namespace load failed for 'cellassign': .onLoad failed in loadNamespace() for 'cellassign', details: call: fun(libname, pkgname) error: Tensorflow installation not detected. Please run 'tensorflow::install_tensorflow()' to continue...

So, I don't really understand why this pops up since I did the previous steps. I would appreciate any help. Thanks so much!

kieranrcampbell commented 4 years ago

Woops. What does the output of

tensorflow::tf_config()

look like?

VicenteFR commented 4 years ago

Thanks for your immediate answer!

This is what I got from tensorflow::tf_config()...

`Installation of TensorFlow not found.

Python environments searched for 'tensorflow' package: /home/vfajardo/python/miniconda/bin/python3.7 /home/vfajardo/python/miniconda/bin/python3.7 /usr/bin/python2.7 /usr/bin/python3.4

You can install TensorFlow using the install_tensorflow() function.`

Interesting! Though I don't really know what's going on then, since this is what I get after doing tensorflow::install_tensorflow(lib="/path/to/my/R/v3.6/packages/dir") :

`Successfully installed absl-py-0.8.0 astor-0.8.0 cloudpickle-1.2.2 decorator-4.4.0 gast-0.3.2 google-pasta-0.1.7 grpcio-1.24.0 h5py-2.10.0 keras-applications-1.0.8 keras-preprocessing-1.1.0 markdown-3.1.1 numpy-1.17.2 protobuf-3.9.2 setuptools-41.2.0 six-1.12.0 tensorboard-1.14.0 tensorflow-1.14.0 tensorflow-estimator-1.14.0 tensorflow-hub-0.6.0 tensorflow-probability-0.8.0 termcolor-1.1.0 werkzeug-0.16.0 wheel-0.33.6 wrapt-1.11.2

Installation complete.`

You think it has something to do with the way I'm installing tensorflow? Should I do it differently?

kieranrcampbell commented 4 years ago

Very odd -- what does install_tensorflow(method='conda') do? Are you on MacOS or Linux for this?

VicenteFR commented 4 years ago

Let me try that. I am using a Linux server.

Thanks.

VicenteFR commented 4 years ago

I already tried using install_tensorflow(method='conda'), but I get the same result as before after using tensorflow::tf_config(). However, when doing this I realized that I get an error trying install_tensorflow() that says:

ERROR: tensorflow-probability 0.8.0 has requirement gast<0.3,>=0.2, but you'll have gast 0.3.2 which is incompatible.

which is followed by the result I had shown above...

Installing collected packages: gast, numpy, six, h5py, keras-applications, wrapt, google-pasta, grpcio, keras-preprocessing, astor, absl-py, setuptools, markdown, protobuf, wheel, werkzeug, tensorboard, termcolor, tensorflow-estimator, tensorflow, tensorflow-hub, decorator, cloudpickle, tensorflow-probability Successfully installed absl-py-0.8.0 astor-0.8.0 cloudpickle-1.1.1 decorator-4.4.0 gast-0.3.2 google-pasta-0.1.7 grpcio-1.24.0 h5py-2.10.0 keras-applications-1.0.8 keras-preprocessing-1.1.0 markdown-3.1.1 numpy-1.17.2 protobuf-3.9.2 setuptools-41.2.0 six-1.12.0 tensorboard-1.14.0 tensorflow-1.14.0 tensorflow-estimator-1.14.0 tensorflow-hub-0.6.0 tensorflow-probability-0.8.0 termcolor-1.1.0 werkzeug-0.16.0 wheel-0.33.6 wrapt-1.11.2

Installation complete.

So I guess the Installation complete sections is output regarding the libraries it shows above, so the real problem is about gast package. Any suggestion about how to deal with this?

Again, thanks so much!

Irrationone commented 4 years ago

Likely has to do with this issue:

https://github.com/tensorflow/tensorflow/issues/32319

If you follow the instructions and downgrade gast in the conda environment that tensorflow uses (likely r-tensorflow) then it'll hopefully work.

VicenteFR commented 4 years ago

Hi!

Yes, that was the problem. However, the real source of the problem was my conda environment. Somehow I just couldn't downgrade gast version 0.3.2 to 0.2.2 and I don't really know what was going on. My solution was to install tensor flow in an independent environment and use this to, finally, install cellassign and save it to my R packages directory. Nonetheless, I finally got it.

Thanks so much everyone!

kieranrcampbell commented 4 years ago

cellassign now updated to use Tensorflow 2.0.0

VicenteFR commented 4 years ago

Thanks for the update!

On Mon, Oct 7, 2019 at 2:50 PM Kieran R Campbell notifications@github.com wrote:

cellassign now updated to use Tensorflow 2.0.0

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Irrationone/cellassign/issues/48?email_source=notifications&email_token=ANLS5NFVNXXRPTPSUJHQ6QLQNOVLZA5CNFSM4I4NKN7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAR5OTI#issuecomment-539219789, or mute the thread https://github.com/notifications/unsubscribe-auth/ANLS5NE6YCXO6UH7KEJ32OLQNOVLZANCNFSM4I4NKN7A .

-- Vicente Fajardo Research technician at the Vijayanand Lab in the La Jolla Institute for Immunology Student of the Undergraduate Program on Genomic Sciences (LCG) of the National Autonomous University of Mexico (UNAM)