-
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 problems #510
Comments
Have you run |
This is my exact install tensorflow installation command. install_tensorflow(method = "conda", |
Many installation issues are resolved by running the following in a fresh R session (you can restart R in Rstudio with Ctrl+Shift+F10) : # install the development version of packages, in case the
# issue is already fixed but not on CRAN yet.
install.packages("remotes")
remotes::install_github(sprintf("rstudio/%s", c("reticulate", "tensorflow", "keras")))
reticulate::miniconda_uninstall() # start with a blank slate
reticulate::install_miniconda()
keras::install_keras() Test to see if installation was successful. tensorflow::as_tensor("Hello World") If the above snippet succeeded and you saw something like If the above installation failed, please gather some diagnostic info: reticulate::py_config()
tensorflow::tf_config()
reticulate::import("tensorflow")
reticulate::py_last_error()
sessionInfo() Please copy and paste the FULL OUTPUT of running all three snippets, and be sure to enclose the output lines with three backticks (```) for monospace formatting. |
Thanks so much [it worked like a charm. However, I am still puzzled why the conda version of install kept failing. Nonetheless thanks o much for your kind assistance, really appreciated. |
@t-kalinowski hope you are doing great. Thanks for this solution. I got stuck in the last step. this error: `> tensorflow::install_tensorflow()
Remove all packages in environment C:\Users\moubi\AppData\Local\R-MINI~1\envs\r-tensorflow: Package Planenvironment location: C:\Users\moubi\AppData\Local\R-MINI~1\envs\r-tensorflow The following packages will be REMOVED: bzip2-1.0.8-hcfcfb64_5 Preparing transaction: ...working... done
Package Planenvironment location: C:\Users\moubi\AppData\Local\R-MINI~1\envs\r-tensorflow added / updated specs: The following NEW packages will be INSTALLED: bzip2 conda-forge/win-64::bzip2-1.0.8-hcfcfb64_5 Preparing transaction: ...working... done C:\Users\moubi\Documents\s.sudan_conflict_vs_soghum_yield\new_project>CALL "C:\Users\moubi\AppData\Local\r-miniconda\condabin\activate.bat" "r-tensorflow" C:\Users\moubi\Documents\s.sudan_conflict_vs_soghum_yield\new_project>conda.bat activate "r-tensorflow" (r-tensorflow) C:\Users\moubi\Documents\s.sudan_conflict_vs_soghum_yield\new_project>"C:\Users\moubi\AppData\Local\r-miniconda\envs\r-tensorflow/python.exe" -m pip install --upgrade --no-user "tensorflow==2.14." |
Hi @Allisterh We no longer recommend using miniconda as the default installation path for TensorFlow. We recommend installing Python normally, either from www.python.org, or by running E.g., this should work: reticulate::install_python()
keras::install_keras() |
Does it matter which version of Python you install? |
Being on the latest Python version is generally not advisable, ~2 minor versions behind the current Python minor release version is generally the sweet spot for deep learning packages. (3.9.* or 3.10.* today). The default argument to |
I hope this an issue that easily resolved. I have been trying to get TensorFlow and keras to work on my machine for weeks now (windows 11). I can install both packages easily (btw I have anaconda 4.10.3 and R version 4.1.2 installed). However, whenever I close R and reopen it load the packages and try to use them I get this message:
Error: Valid installation of TensorFlow not found.
Python environments searched for 'tensorflow' package:
C:\Users\Alister\anaconda3\python.exe
Python exception encountered:
ModuleNotFoundError: No module named 'tensorflow'
Detailed traceback:
File "C:\Users\Alister\Dropbox\PC (2)\Documents\R\win-library\4.1\reticulate\python\rpytools\loader.py", line 39, in _import_hook
module = _import(
You can install TensorFlow using the install_tensorflow() function.
Please can someone tell me what is happening here is this a reticulate problem or tensorflow problem. Like I said I successfully installed TensorFlow and created a an environment in Anaconda but for the life of me it just wont work.
The text was updated successfully, but these errors were encountered: