0

I installed Keras and Tensorflow in R. When I perform: reticulate::py_config()

I got the following message. As detailed Python version 3.6 is used while I installed 3.8 previously.

> reticulate::py_config()
python:         C:/Users/Mezeix/AppData/Local/r-miniconda/envs/r-reticulate/python.exe
libpython:      C:/Users/Mezeix/AppData/Local/r-miniconda/envs/r-reticulate/python36.dll
pythonhome:     C:/Users/Mezeix/AppData/Local/r-miniconda/envs/r-reticulate
version:        3.6.10 |Anaconda, Inc.| (default, May  7 2020, 19:46:08) [MSC v.1916 64 bit (AMD64)]
Architecture:   64bit
numpy:          C:/Users/Mezeix/AppData/Local/r-miniconda/envs/r-reticulate/Lib/site-packages/numpy
numpy_version:  1.19.1

How to change the libpython path in order to use Python 3.8 I have in the following folder: C:\Users\Mezeix\AppData\Local\r-miniconda

Laurent
  • 419
  • 4
  • 14
  • Does this answer your question? [Error: Unable to find conda binary. Is Anaconda installed?](https://stackoverflow.com/questions/60974507/error-unable-to-find-conda-binary-is-anaconda-installed) – jkr Aug 12 '20 at 02:30
  • I tried the 3 ways. By Example: original_path <- Sys.getenv("PATH") Sys.setenv(PATH = paste("C:/Users/Mezeix/AppData/Local/r-miniconda", original_path, sep = ":")). Still use Python 3.6 library(reticulate) reticulate::py_config() – Laurent Aug 12 '20 at 02:42

1 Answers1

0

path for Python seems to be changed. Python 3.8 I have in the following folder: C:\Users\Mezeix\AppData\Local\r-miniconda.

I used these 3 different way to change the folder in R but with no succeed. I have always the wrong folder.

Way 1:

Sys.setenv(RETICULATE_PYTHON = "C:/Users/Mezeix/AppData/Local/r-miniconda")
library(reticulate)

Way 2:

options(reticulate.conda_binary = "C:/Users/Mezeix/AppData/Local/r-miniconda")
library(reticulate)

Way 3:

original_path <- Sys.getenv("PATH")
Sys.setenv(PATH = paste("C:/Users/Mezeix/AppData/Local/r-miniconda", original_path, sep = ":"))
library(reticulate)
reticulate::py_config()



> reticulate::py_config()
python:         C:/Users/Mezeix/AppData/Local/r-miniconda/envs/r-reticulate/python.exe
libpython:      C:/Users/Mezeix/AppData/Local/r-miniconda/envs/r-reticulate/python36.dll

May be I did some mistake in the process? Is there any others way?

Laurent
  • 419
  • 4
  • 14