-
Notifications
You must be signed in to change notification settings - Fork 321
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
Python module tensorflow was not found - but only when run in Rstudio #87
Comments
For some reason tensorflow can't be loaded when in RStudio Server in your configuration. Try a plain import statement on "tensorflow" to see if you get more diagnostics as to why: tflow <- import("tensorflow") |
ok hanks just ran and got:
But I would have thought it would have been found:
|
It could be that system("ldd /usr/local/cuda-7.0/lib64/libcudart.so.7.0") |
|
I have no idea then :-\ LD_LIBRARY_PATH issues can be very hard to run down. It could be that the library is found but for some other reason is failing to load. For whatever reason TF can't load that library but without getting hands on your system it's hard to say why. |
I was able to fix this by running:
Thanks! |
Great! |
I had the same issue but then it worked by re-starting RStudio |
I am relatively new to Python so wanted to share what happened to me when I had a similar problem and how I solved it. My problem was because although I had already installed Python I hadn't realised I needed to actually install TensorFlow! I used this link to install TensorFlow: https://www.tensorflow.org/install/ Following this I restarted RStudio and ran: Then I ran a little test:
And it worked as hoped. |
A simple 'hello world' runs just fine from the command line ( via Rscript hello.R )
However, running from inside the Rstudio (server) IDE gives the error:
In both cases
py_config()
returns:Detected Python configuration:
python: /usr/bin/python
libpython: /usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so
pythonhome: /usr:/usr
version: 2.7.6 (default, Oct 26 2016, 20:30:19) [GCC 4.8.4]
numpy: /usr/local/lib/python2.7/dist-packages/numpy
numpy_version: 1.12.0
tensorflow: /usr/local/lib/python2.7/dist-packages/tensorflow
python versions found:
/usr/bin/python
/usr/bin/python3
Is there some other set of path variables I could be checking and modifying?
SessionInfo() from IDE:
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8
[6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] tools stats graphics grDevices utils datasets methods base
other attached packages:
[1] tensorflow_0.6.0
loaded via a namespace (and not attached):
[1] Rcpp_0.12.9 reticulate_0.6.0
The text was updated successfully, but these errors were encountered: