-
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
Installation error of tensorflow
and keras
on Ubuntu
#466
Comments
Hi thanks for filing.
suggests the R package failed to install properly. Can you reproduce this issue in a fresh R session started without .Rprofile (perhaps started with a –vanilla flag if that’s easier) |
Download package from GitHub. > library(tensorflow)
> install_tensorflow(method = 'conda', envname = 'r-reticulate')
> use_condaenv('r-reticulate')
> library(reticulate)
> tf$constant("Hellow Tensorflow")
2021-06-06 03:27:53.040698: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
Error: Valid installation of TensorFlow not found.
Python environments searched for 'tensorflow' package:
/home/englianhu/anaconda3/bin/python3.8
Python exception encountered:
NotFoundError: /home/englianhu/anaconda3/lib/python3.8/site-packages/tensorflow/core/kernels/libtfkernel_sobol_op.so: undefined symbol: _ZNK10tensorflow8OpKernel11TraceStringB5cxx11ERKNS_15OpKernelContextEb
Detailed traceback:
File "/usr/lib/R/site-library/reticulate/python/rpytools/loader.py", line 39, in _import_hook
module = _import(
File "/home/englianhu/.local/lib/python3.8/site-packages/tensorflow/__init__.py", line 436, in <module>
_ll.load_library(_main_dir)
File "/home/englianhu/.local/lib/python3.8/site-packages/tensorflow/python/framework/load_library.py", line 153, in load_library
py_tf.TF_LoadLibrary(lib)
You can install TensorFlow using the install_tensorflow() function. source : Python in R - Error: could not find a Python environment for and then move the package to :~$ sudo apt-get install rsync -y
:~$ sudo rsync -a source/ target/ source : Rdatatable/data.table#5030 (comment) x [master]> tf$constant("Hellow Tensorflow")
Error: Python module tensorflow was not found.
Detected Python configuration:
python: /home/englianhu/anaconda3/bin/python3
libpython: /home/englianhu/anaconda3/lib/libpython3.8.so
pythonhome: /home/englianhu/anaconda3:/home/englianhu/anaconda3
version: 3.8.8 (default, Apr 13 2021, 19:58:26) [GCC 7.3.0]
numpy: /home/englianhu/.local/lib/python3.8/site-packages/numpy
numpy_version: 1.19.5
tensorflow: /home/englianhu/.local/lib/python3.8/site-packages/tensorflow
NOTE: Python version was forced by RETICULATE_PYTHON
x [master]> library(tensorflow)
✓ [master]> library(reticulate)
✓ [master]> tf$constant("Hellow Tensorflow")
Error: Python module tensorflow was not found.
Detected Python configuration:
python: /home/englianhu/anaconda3/bin/python3
libpython: /home/englianhu/anaconda3/lib/libpython3.8.so
pythonhome: /home/englianhu/anaconda3:/home/englianhu/anaconda3
version: 3.8.8 (default, Apr 13 2021, 19:58:26) [GCC 7.3.0]
numpy: /home/englianhu/.local/lib/python3.8/site-packages/numpy
numpy_version: 1.19.5
tensorflow: /home/englianhu/.local/lib/python3.8/site-packages/tensorflow
NOTE: Python version was forced by RETICULATE_PYTHON source : Rdatatable/data.table#5030 (comment) installed through :~$ wget https://cran.r-project.org/src/contrib/tensorflow_2.4.0.tar.gz
:~$ R CMD INSTALL tensorflow_2.4.0.tar.gz
...
...
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (tensorflow) ✓ [master]> library(tensorflow)
✓ [master]> library(reticulate)
✓ [master]> tf$constant("Hellow Tensorflow")
Error: Python module tensorflow was not found.
Detected Python configuration:
python: /home/englianhu/anaconda3/bin/python3
libpython: /home/englianhu/anaconda3/lib/libpython3.8.so
pythonhome: /home/englianhu/anaconda3:/home/englianhu/anaconda3
version: 3.8.8 (default, Apr 13 2021, 19:58:26) [GCC 7.3.0]
numpy: /home/englianhu/.local/lib/python3.8/site-packages/numpy
numpy_version: 1.19.5
tensorflow: /home/englianhu/.local/lib/python3.8/site-packages/tensorflow
NOTE: Python version was forced by RETICULATE_PYTHON |
In the screen shot of the RStudio build pane, is that running within the conda environment already? If so, can you try to launch R/Rstudio from outside the conda environment, and allow reticulate to activate the conda env? |
Automatically closed because there has not been a response for 30 days. When you're ready to work on this further, please comment here and the issue will automatically reopen. |
Official TensorFlow for R guide on installation doesn't work, kindly look into it
Originally posted by @englianhu in #463 (comment)
same with
keras
The text was updated successfully, but these errors were encountered: