Skip to content
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

Help needed - Installation Issue #1385

Closed
sirajrawood opened this issue Oct 26, 2023 · 4 comments
Closed

Help needed - Installation Issue #1385

sirajrawood opened this issue Oct 26, 2023 · 4 comments

Comments

@sirajrawood
Copy link

Hi, I've been trying to install Keras/Tensorflow for a while now. I have followed the below code from the template. Everything seems to install fine until the last line keras::install_keras(), therefore I can't test.

# 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")))
if (is.null(reticulate::virtualenv_starter()))
  reticulate::install_python()
keras::install_keras()

The output: (I have put the full output above at the end)

Virtual environment "r-tensorflow" removed.
Using Python: C:/Users/User/AppData/Local/Programs/Python/Python312/python.exe
Creating virtual environment "r-tensorflow" ... 
+ "C:/Users/User/AppData/Local/Programs/Python/Python312/python.exe" -m venv "C:/Users/User/Documents/.virtualenvs/r-tensorflow"
Done!
Installing packages: pip, wheel, setuptools
+ "C:/Users/User/Documents/.virtualenvs/r-tensorflow/Scripts/python.exe" -m pip install --upgrade pip wheel setuptools
Requirement already satisfied: pip in c:\users\user\docume~1\virtua~1\r-tens~1\lib\site-packages (23.2.1)
Collecting pip
  Obtaining dependency information for pip from https://files.pythonhosted.org/packages/47/6a/453160888fab7c6a432a6e25f8afe6256d0d9f2cbd25971021da6491d899/pip-23.3.1-py3-none-any.whl.metadata
  Using cached pip-23.3.1-py3-none-any.whl.metadata (3.5 kB)
Collecting wheel
  Obtaining dependency information for wheel from https://files.pythonhosted.org/packages/b8/8b/31273bf66016be6ad22bb7345c37ff350276cfd46e389a0c2ac5da9d9073/wheel-0.41.2-py3-none-any.whl.metadata
  Using cached wheel-0.41.2-py3-none-any.whl.metadata (2.2 kB)
Collecting setuptools
  Obtaining dependency information for setuptools from https://files.pythonhosted.org/packages/bb/26/7945080113158354380a12ce26873dd6c1ebd88d47f5bc24e2c5bb38c16a/setuptools-68.2.2-py3-none-any.whl.metadata
  Using cached setuptools-68.2.2-py3-none-any.whl.metadata (6.3 kB)
Using cached pip-23.3.1-py3-none-any.whl (2.1 MB)
Using cached wheel-0.41.2-py3-none-any.whl (64 kB)
Using cached setuptools-68.2.2-py3-none-any.whl (807 kB)
Installing collected packages: wheel, setuptools, pip
  Attempting uninstall: pip
    Found existing installation: pip 23.2.1
    Uninstalling pip-23.2.1:
      Successfully uninstalled pip-23.2.1
Successfully installed pip-23.3.1 setuptools-68.2.2 wheel-0.41.2
Virtual environment 'r-tensorflow' successfully created.
Using virtual environment "r-tensorflow" ...
+ "C:/Users/User/Documents/.virtualenvs/r-tensorflow/Scripts/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"

Even if I change it to 'keras::install_keras(version = 2.13)' I still get the same error (the default is version 2.14).

I also rant he diagnostic info as requested:

reticulate::py_config()
tensorflow::tf_config()
reticulate::import("tensorflow")
reticulate::py_last_error()
sessionInfo()
> reticulate::py_config()
python:         C:/Users/User/anaconda3/python.exe
libpython:      C:/Users/User/anaconda3/python311.dll
pythonhome:     C:/Users/User/anaconda3
version:        3.11.5 | packaged by Anaconda, Inc. | (main, Sep 11 2023, 13:26:23) [MSC v.1916 64 bit (AMD64)]
Architecture:   64bit
numpy:          C:/Users/User/anaconda3/Lib/site-packages/numpy
numpy_version:  1.24.3
tensorflow:     [NOT FOUND]

NOTE: Python version was forced by use_python() function
> tensorflow::tf_config()
Valid installation of TensorFlow not found.

Python environments searched for 'tensorflow' package:
 C:\Users\User\anaconda3\python.exe

Python exception encountered:
 Traceback (most recent call last):
  File "C:\Users\User\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\User\AppData\Local\R\win-library\4.3\reticulate\python\rpytools\loader.py", line 93, in _run_hook
    module = hook()
             ^^^^^^
  File "C:\Users\User\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.
 
> reticulate::import("tensorflow")
Error in py_module_import(module, convert = convert) : 
  ModuleNotFoundError: No module named 'tensorflow'
Run `reticulate::py_last_error()` for details.
> reticulate::py_last_error()

── Python Exception Message ─────────────────────────────────────────────────────────────
Traceback (most recent call last):
  File "C:\Users\User\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\User\AppData\Local\R\win-library\4.3\reticulate\python\rpytools\loader.py", line 93, in _run_hook
    module = hook()
             ^^^^^^
  File "C:\Users\User\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'

── R Traceback ──────────────────────────────────────────────────────────────────────────
    ▆
 1. └─reticulate::import("tensorflow")
 2.   └─reticulate:::py_module_import(module, convert = convert)
> sessionInfo()
R version 4.3.1 (2023-06-16 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default


locale:
[1] LC_COLLATE=English_South Africa.utf8  LC_CTYPE=English_South Africa.utf8   
[3] LC_MONETARY=English_South Africa.utf8 LC_NUMERIC=C                         
[5] LC_TIME=English_South Africa.utf8    

time zone: Africa/Johannesburg
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] crayon_1.5.2           cli_3.6.1              rlang_1.1.1           
 [4] zeallot_0.1.0          processx_3.8.2         png_0.1-8             
 [7] generics_0.1.3         jsonlite_1.8.7         prettyunits_1.2.0     
[10] keras_2.13.0.9000      rprojroot_2.0.3        pkgbuild_1.4.2        
[13] ps_1.7.5               rappdirs_0.3.3         grid_4.3.1            
[16] tfruns_1.5.1           base64enc_0.1-3        lifecycle_1.0.3       
[19] whisker_0.4.1          compiler_4.3.1         Rcpp_1.0.11           
[22] rstudioapi_0.15.0      lattice_0.21-8         R6_2.5.1              
[25] reticulate_1.34.0.9000 curl_5.1.0             tensorflow_2.14.0.9000
[28] callr_3.7.3            magrittr_2.0.3         Matrix_1.6-1.1        
[31] tools_4.3.1            withr_2.5.1            remotes_2.4.2.1       
[34] desc_1.4.2            

(Here is the full output from installing the packages):

> # install the development version of packages, in case the
> # issue is already fixed but not on CRAN yet.
> install.packages("remotes")
Installing package intoC:/Users/User/AppData/Local/R/win-library/4.3’
(aslibis unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.3/remotes_2.4.2.1.zip'
Content type 'application/zip' length 398796 bytes (389 KB)
downloaded 389 KB

packageremotessuccessfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\User\AppData\Local\Temp\RtmpINwchA\downloaded_packages
> remotes::install_github(sprintf("rstudio/%s", c("reticulate", "tensorflow", "keras")))
Skipping install of 'reticulate' from a github remote, the SHA1 (5d0a9a52) has not changed since last install.
  Use `force = TRUE` to force installation
Skipping install of 'tensorflow' from a github remote, the SHA1 (eeb1e66b) has not changed since last install.
  Use `force = TRUE` to force installation
Skipping install of 'keras' from a github remote, the SHA1 (28e9b506) has not changed since last install.
  Use `force = TRUE` to force installation
> remotes::install_github(sprintf("rstudio/%s", c("reticulate", "tensorflow", "keras")), force = TRUE)
Downloading GitHub repo rstudio/reticulate@HEAD
── R CMD build ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file 'C:\Users\User\AppData\Local\Temp\RtmpINwchA\remotes544c30a431e6\rstudio-reticulate-5d0a9a5/DESCRIPTION' ...preparing 'reticulate':checking DESCRIPTION meta-information ...cleaning srcchecking for LF line-endings in source and make files and shell scriptschecking for empty or unneeded directoriesbuilding 'reticulate_1.34.0.9000.tar.gz'
   
Installing package intoC:/Users/User/AppData/Local/R/win-library/4.3’
(aslibis unspecified)
* installing *source* package 'reticulate' ...
** using staged installation
** libs
using C++ compiler: 'G__~1.EXE (GCC) 12.3.0'
g++ -std=gnu++17  -I"C:/PROGRA~1/R/R-43~1.1/include" -DNDEBUG  -I'C:/Users/User/AppData/Local/R/win-library/4.3/Rcpp/include'   -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++17  -I"C:/PROGRA~1/R/R-43~1.1/include" -DNDEBUG  -I'C:/Users/User/AppData/Local/R/win-library/4.3/Rcpp/include'   -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c event_loop.cpp -o event_loop.o
g++ -std=gnu++17  -I"C:/PROGRA~1/R/R-43~1.1/include" -DNDEBUG  -I'C:/Users/User/AppData/Local/R/win-library/4.3/Rcpp/include'   -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c libpython.cpp -o libpython.o
g++ -std=gnu++17  -I"C:/PROGRA~1/R/R-43~1.1/include" -DNDEBUG  -I'C:/Users/User/AppData/Local/R/win-library/4.3/Rcpp/include'   -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c output.cpp -o output.o
g++ -std=gnu++17  -I"C:/PROGRA~1/R/R-43~1.1/include" -DNDEBUG  -I'C:/Users/User/AppData/Local/R/win-library/4.3/Rcpp/include'   -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c python.cpp -o python.o
g++ -std=gnu++17  -I"C:/PROGRA~1/R/R-43~1.1/include" -DNDEBUG  -I'C:/Users/User/AppData/Local/R/win-library/4.3/Rcpp/include'   -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c readline.cpp -o readline.o
g++ -std=gnu++17  -I"C:/PROGRA~1/R/R-43~1.1/include" -DNDEBUG  -I'C:/Users/User/AppData/Local/R/win-library/4.3/Rcpp/include'   -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c signals.cpp -o signals.o
g++ -std=gnu++17 -shared -s -static-libgcc -o reticulate.dll tmp.def RcppExports.o event_loop.o libpython.o output.o python.o readline.o signals.o -LC:/rtools43/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/rtools43/x86_64-w64-mingw32.static.posix/lib -LC:/PROGRA~1/R/R-43~1.1/bin/x64 -lR
installing to C:/Users/User/AppData/Local/R/win-library/4.3/00LOCK-reticulate/00new/reticulate/libs/x64
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** 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 (reticulate)
Downloading GitHub repo rstudio/tensorflow@HEAD
── R CMD build ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file 'C:\Users\User\AppData\Local\Temp\RtmpINwchA\remotes544c108b2366\rstudio-tensorflow-eeb1e66/DESCRIPTION' ...preparing 'tensorflow':checking DESCRIPTION meta-information ...checking for LF line-endings in source and make files and shell scriptschecking for empty or unneeded directoriesbuilding 'tensorflow_2.14.0.9000.tar.gz'
   
Installing package intoC:/Users/User/AppData/Local/R/win-library/4.3’
(aslibis unspecified)
* installing *source* package 'tensorflow' ...
** using staged installation
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** 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)
Downloading GitHub repo rstudio/keras@HEAD
── R CMD build ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file 'C:\Users\User\AppData\Local\Temp\RtmpINwchA\remotes544cf66290a\rstudio-keras-28e9b50/DESCRIPTION' ...preparing 'keras': (6.7s)
✔  checking DESCRIPTION meta-information ...checking for LF line-endings in source and make files and shell scripts (1.5s)
─  checking for empty or unneeded directories
   Removed empty directory 'keras/man-roxygen'building 'keras_2.13.0.9000.tar.gz'
   
Installing package intoC:/Users/User/AppData/Local/R/win-library/4.3’
(aslibis unspecified)
* installing *source* package 'keras' ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** 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 (keras)
> if (is.null(reticulate::virtualenv_starter()))
+   reticulate::install_python()
> is.null(reticulate::virtualenv_starter())
[1] FALSE
> keras::install_keras()
Virtual environment "r-tensorflow" removed.
Using Python: C:/Users/User/AppData/Local/Programs/Python/Python312/python.exe
Creating virtual environment "r-tensorflow" ... 
+ "C:/Users/User/AppData/Local/Programs/Python/Python312/python.exe" -m venv "C:/Users/User/Documents/.virtualenvs/r-tensorflow"
Done!
Installing packages: pip, wheel, setuptools
+ "C:/Users/User/Documents/.virtualenvs/r-tensorflow/Scripts/python.exe" -m pip install --upgrade pip wheel setuptools
Requirement already satisfied: pip in c:\users\user\docume~1\virtua~1\r-tens~1\lib\site-packages (23.2.1)
Collecting pip
  Obtaining dependency information for pip from https://files.pythonhosted.org/packages/47/6a/453160888fab7c6a432a6e25f8afe6256d0d9f2cbd25971021da6491d899/pip-23.3.1-py3-none-any.whl.metadata
  Using cached pip-23.3.1-py3-none-any.whl.metadata (3.5 kB)
Collecting wheel
  Obtaining dependency information for wheel from https://files.pythonhosted.org/packages/b8/8b/31273bf66016be6ad22bb7345c37ff350276cfd46e389a0c2ac5da9d9073/wheel-0.41.2-py3-none-any.whl.metadata
  Using cached wheel-0.41.2-py3-none-any.whl.metadata (2.2 kB)
Collecting setuptools
  Obtaining dependency information for setuptools from https://files.pythonhosted.org/packages/bb/26/7945080113158354380a12ce26873dd6c1ebd88d47f5bc24e2c5bb38c16a/setuptools-68.2.2-py3-none-any.whl.metadata
  Using cached setuptools-68.2.2-py3-none-any.whl.metadata (6.3 kB)
Using cached pip-23.3.1-py3-none-any.whl (2.1 MB)
Using cached wheel-0.41.2-py3-none-any.whl (64 kB)
Using cached setuptools-68.2.2-py3-none-any.whl (807 kB)
Installing collected packages: wheel, setuptools, pip
  Attempting uninstall: pip
    Found existing installation: pip 23.2.1
    Uninstalling pip-23.2.1:
      Successfully uninstalled pip-23.2.1
Successfully installed pip-23.3.1 setuptools-68.2.2 wheel-0.41.2
Virtual environment 'r-tensorflow' successfully created.
Using virtual environment "r-tensorflow" ...
+ "C:/Users/User/Documents/.virtualenvs/r-tensorflow/Scripts/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"
> keras::install_keras(version = 2.13)
Virtual environment "r-tensorflow" removed.
Using Python: C:/Users/User/AppData/Local/Programs/Python/Python312/python.exe
Creating virtual environment "r-tensorflow" ... 
+ "C:/Users/User/AppData/Local/Programs/Python/Python312/python.exe" -m venv "C:/Users/User/Documents/.virtualenvs/r-tensorflow"
Done!
Installing packages: pip, wheel, setuptools
+ "C:/Users/User/Documents/.virtualenvs/r-tensorflow/Scripts/python.exe" -m pip install --upgrade pip wheel setuptools
Requirement already satisfied: pip in c:\users\user\docume~1\virtua~1\r-tens~1\lib\site-packages (23.2.1)
Collecting pip
  Obtaining dependency information for pip from https://files.pythonhosted.org/packages/47/6a/453160888fab7c6a432a6e25f8afe6256d0d9f2cbd25971021da6491d899/pip-23.3.1-py3-none-any.whl.metadata
  Using cached pip-23.3.1-py3-none-any.whl.metadata (3.5 kB)
Collecting wheel
  Obtaining dependency information for wheel from https://files.pythonhosted.org/packages/b8/8b/31273bf66016be6ad22bb7345c37ff350276cfd46e389a0c2ac5da9d9073/wheel-0.41.2-py3-none-any.whl.metadata
  Using cached wheel-0.41.2-py3-none-any.whl.metadata (2.2 kB)
Collecting setuptools
  Obtaining dependency information for setuptools from https://files.pythonhosted.org/packages/bb/26/7945080113158354380a12ce26873dd6c1ebd88d47f5bc24e2c5bb38c16a/setuptools-68.2.2-py3-none-any.whl.metadata
  Using cached setuptools-68.2.2-py3-none-any.whl.metadata (6.3 kB)
Using cached pip-23.3.1-py3-none-any.whl (2.1 MB)
Using cached wheel-0.41.2-py3-none-any.whl (64 kB)
Using cached setuptools-68.2.2-py3-none-any.whl (807 kB)
Installing collected packages: wheel, setuptools, pip
  Attempting uninstall: pip
    Found existing installation: pip 23.2.1
    Uninstalling pip-23.2.1:
      Successfully uninstalled pip-23.2.1
Successfully installed pip-23.3.1 setuptools-68.2.2 wheel-0.41.2
Virtual environment 'r-tensorflow' successfully created.
Using virtual environment "r-tensorflow" ...
+ "C:/Users/User/Documents/.virtualenvs/r-tensorflow/Scripts/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"

Please let me know if any other info is needed. Grateful for any help! Thank you for your assistance!

@sirajrawood sirajrawood changed the title Installation Issue Help needed - Installation Issue Oct 26, 2023
@t-kalinowski
Copy link
Member

t-kalinowski commented Oct 27, 2023

Hi, I believe your python version is too recent/new for the tensorflow version being installed. Can you please install an older version, e.g, 3.9 or 3.10?

reticulate::install_python("3.10:latest")

@sirajrawood
Copy link
Author

Hi, I believe your python version is too recent/new for the tensorflow version being installed. Can you please install an older version, e.g, 3.9 or 3.10?

reticulate::install_python("3.10:latest")

Thanks, will do. Will I have to uninstall first as well? or should it overwrite?

@sirajrawood
Copy link
Author

Hi, I believe your python version is too recent/new for the tensorflow version being installed. Can you please install an older version, e.g, 3.9 or 3.10?

reticulate::install_python("3.10:latest")

I ran it, installation was complated:
(last three lines)

:: [Installing] ::  3.10.11 ...
:: [Info] :: completed! 3.10.11
[1] "C:/Users/User/AppData/Local/r-reticulate/r-reticulate/pyenv/pyenv-win/versions/3.10.11/python.exe"

I reran keras::install_keras() and get

Installation complete.

But now when I test using tensorflow::as_tensor("Hello World") I get

Error: Valid installation of TensorFlow not found.

Python environments searched for 'tensorflow' package:
 C:\Users\User\anaconda3\python.exe

Python exception encountered:
 Traceback (most recent call last):
  File "C:\Users\User\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\User\AppData\Local\R\win-library\4.3\reticulate\python\rpytools\loader.py", line 93, in _run_hook
    module = hook()
             ^^^^^^
  File "C:\Users\User\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.

Do I need to point to the new installed python version (3.10), if I run py_config() I get:

> reticulate::py_config()
python:         C:/Users/User/anaconda3/python.exe
libpython:      C:/Users/User/anaconda3/python311.dll
pythonhome:     C:/Users/User/anaconda3
version:        3.11.5 | packaged by Anaconda, Inc. | (main, Sep 11 2023, 13:26:23) [MSC v.1916 64 bit (AMD64)]
Architecture:   64bit
numpy:          C:/Users/User/anaconda3/Lib/site-packages/numpy
numpy_version:  1.24.3
tensorflow:     [NOT FOUND]

NOTE: Python version was forced by use_python() function

Thank you for your help!

@sirajrawood
Copy link
Author

Okay, I changed it in the global options and now everything is working! Thank you!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants