-
Notifications
You must be signed in to change notification settings - Fork 282
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
trouble installing Tensorflow #1380
Comments
Hi, sorry you're having issues. We no longer recommend using miniconda, and now recommend using a virtual environment. Can you please follow the instructions in the "Installation Issue" template and report back? |
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. |
Hi, I am experiencing the same installation problem with install_keras().
Please find below the output of the diagnostic commands you asked for. Thanks for your help!
NOTE: Python version was forced by import("tensorflow")
Python environments searched for 'tensorflow' package: Python exception encountered: You can install TensorFlow using the install_tensorflow() function.
── Python Exception Message ────────────────────────────────────────────────────────────────────────── ── R Traceback ───────────────────────────────────────────────────────────────────────────────────────
Matrix products: default locale: time zone: Europe/Amsterdam attached base packages: loaded via a namespace (and not attached): |
Python 3.12 is too new for the current release of Tensorflow. Please install an older version of Python: reticulate::install_python("3.10:latest")
keras::install_keras(python_version = "3.10") |
Thanks @t-kalinowski, now it works! |
Glad the fix worked! We'll improve the error message for the next release. |
I tried installed keras in R Studio with the following command but it's not working
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()
Everything seems to run fine until it get to the end where it tries to activate Tensorflow
C:\Windows>conda.bat activate "r-tensorflow"
(r-tensorflow) C:\Windows>"C:\Users\username\AppData\Local\r-miniconda\envs\r-tensorflow/python.exe" -m pip install --upgrade --no-user "tensorflow==2.13." tensorflow-hub tensorflow-datasets scipy requests Pillow h5py pandas pydot
ERROR: Could not find a version that satisfies the requirement tensorflow==2.13. (from versions: none)
ERROR: No matching distribution found for tensorflow==2.13.*
Error: Error installing package(s): ""tensorflow==2.13.*"", "tensorflow-hub", "tensorflow-datasets", "scipy", "requests", "Pillow", "h5py", "pandas", "pydot"
In addition: Warning message:
In shell(fi, intern = intern) :
'C:\Users\username\AppData\Local\Temp\Rtmp48SVbE\file42883a5158b2.bat' execution failed with error code 1
I also noticed the version of the python.exe installed in C:\Users\users\AppData\Local\r-miniconda\envs\r-tensorflow
is version 3.12.0 which i read is not compatible with tensorflow
Below is the output from the following codes
reticulate::py_config()
tensorflow::tf_config()
reticulate::import("tensorflow")
reticulate::py_last_error()
sessionInfo()
Python environments searched for 'tensorflow' package:
C:\Users\username\AppData\Local\r-miniconda\envs\r-reticulate\python.exe
Python exception encountered:
Traceback (most recent call last):
File "C:\Users\username\AppData\Local\R\win-library\4.3\reticulate\python\rpytools\loader.py", line 119, in _find_and_load_hook
return _run_hook(name, _hook)
File "C:\Users\username\AppData\Local\R\win-library\4.3\reticulate\python\rpytools\loader.py", line 93, in _run_hook
module = hook()
File "C:\Users\username\AppData\Local\R\win-library\4.3\reticulate\python\rpytools\loader.py", line 117, in _hook
return find_and_load(name, import)
ModuleNotFoundError: No module named 'tensorflow'
You can install TensorFlow using the install_tensorflow() function.
Warning message:
ModuleNotFoundError: No module named 'tensorflow'
Run
reticulate::py_last_error()
for details.Restart the R session and load the tensorflow R package before reticulate has initialized Python, or ensure reticulate initialized a Python installation where the tensorflow module is installed.
i would appreciate if someone could provide feedback on why it not installing. I've been working on this for days and not making any progress. thank you
The text was updated successfully, but these errors were encountered: