Tensorflow crash R session [R studio - Ubuntu 18.04]

I tried many ways and lot of time to install tensorflow in R (rstudio) but failed. Here are some ways that I tried:

Method 1:

install.packages("remotes")
remotes::install_github("rstudio/tensorflow")
library(tensorflow)
install_tensorflow(version = "2.0.0b1")

All install successful, but R crash when I run:

library(tensorflow)
tf_config() or tf$abs(-1)

Method 2:

install.packages("devtools")
devtools::install_github("rstudio/tensorflow",dependencies=TRUE)
install_tensorflow()

All install successful, but R crash again when I run

tf_config() # or
tf$constant("Hellow Tensorflow")

Method 3:

install.packages("tensorflow")
library(tensorflow)
install_tensorflow()

When install completed, R crash again when I run:

library(tensorflow)
tf$constant("hello tensorflow")

Method 4:

library(tensorflow)
install_tensorflow(method = "conda", envname = "py3.6", conda_python_version = "3.6")

When install completed, R crash again when I run:

library(tensorflow)
tf$constant("hello tensorflow")

My environment:

  • Ubuntu 18.04
  • R studio version 1.4.1103
  • R version 4.0.4
  • Conda version 4.9.2 (installed anaconda in ubuntu)
  • Python version 3.8.5

I see many tensorflow install path in my computer after complete 4 methods above:

path1: home/user/anaconda3/envs/r-reticulate/lib/python3.7/site-packages/tensorflow
path2: home/user/anaconda3/envs/r-reticulate/lib/python3.6/site-packages/tensorflow
path3: home/user/anaconda3/envs/py3.6/lib/python3.6/site-packages/tensorflow
path4: home/user/anaconda3/envs/py3.8.5/lib/python3.7/site-packages/tensorflow

Could you help please ? Thank!