Skip to content

Instantly share code, notes, and snippets.

@jeffreypullin
Last active November 14, 2018 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffreypullin/23dad7c7a15cde9aa3cb7c2c76ab2c57 to your computer and use it in GitHub Desktop.
Save jeffreypullin/23dad7c7a15cde9aa3cb7c2c76ab2c57 to your computer and use it in GitHub Desktop.
# My version
tf <- reticulate::import("tensorflow") # Overides the tf in the package
tfp <- reticulate::import("tensorflow_probability")
py_version <- reticulate::py_config()$version
cat("The version of python is:", py_version, "\n")
cat("The version of tensorflow is:", tf$"__version__", "\n")
cat("The verion of tensorflow-proability is:", tfp$"__version__", "\n")
cat("Extra python information: \n")
reticulate::py_config()
# Nick's suggestion
library(tensorflow)
pkg <- reticulate::import("pkg_resources")
tfp_version <- pkg$get_distribution("tensorflow_probability")$version
tf_version <- tf$`__version__`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment