-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed "tensorflow::install_tensorflow()" #78
Comments
I used to have the same error. And for me, it's fixed after I specify my Anaconda environment. You can try to use the following code. library(reticulate)
use_python("your/environment/path/anaconda3/envs/myenv/bin/python")
use_condaenv('myenv')
install.packages("tensorflow")
tensorflow::install_tensorflow(extra_packages='tensorflow-probability', version = "2.1.0") |
Hi @qrzhang. Thanks for your reply! Does this mean that I can't use cellassign or tensorflow, unless I create/use a conda environment? |
Hello @qrzhang! I followed your tips. I created a new conda environment, cellassign with python=3.7, then activated the environment, then opened Rstudio from the active environment. I think all these 5 lines of codes worked, but there's an error at the end of the 5th code. As you can see from the attached image, it says:
What is this and what should I do? |
Hello, following up on this. Do you any more suggestion? Thanks! |
We had a tough time getting this to work in our environment too and finally came up with an approach that at least works for us. Perhaps it will work for you. Here are a few coarse details about our environment: RStudio Server Pro 1.3, R 4.0.2 and Python 3.8. Basically it boils down to managing a python virtual environment outside of the R environment. First get a run-of-the-mill virtual environment setup with tensorflow.
Replace <place_where_environments_live> appropriately. For me it's /mnt/home/slohr/environments/python Then in R do the following:
From there, everything following the "fit" portion of the tutorial should be possible. A couple of other notes. I'm not a huge fan of Anaconda so I didn't even try that approach. It may work with more twiddling but I don't know what those tricks would be. Also the use_virtualenv and use_python methods would not work in our environment either. Those should have functioned similar to setting the RETICULATE_PYTHON environment variable but they didn't. Perhaps someone knows the right incantation, but for now this approach at least gets to the science part. HTH and good luck! |
I'm also having error with loading cellassign or running |
@slohr Thank you so much! I was going through installation hell, and this finally worked for me! For me, the use_python method wasn't working, but I got it by running that command before anything else; it seems like loading the libraries causes another python installation to load first, which messes it up. I also used the option required=TRUE, but idk how much that makes a difference. |
Hello, I have two lines of commands here. One is
install.packages()
which successfully finished. But the second linetensorflow::install_tensorflow()
failed. I don't understand why. Any advice, please? Thank you!The text was updated successfully, but these errors were encountered: