rstudio / keras3

R Interface to Keras
https://keras3.posit.co/
Other
838 stars 283 forks source link

Ordinal 191 error dynamic link error-- on executing flow_images_from_directory #852

Closed lwdalton3 closed 5 years ago

lwdalton3 commented 5 years ago

Hello. Hope there is help On Windows 10

As per email from those who know I have followed the below recommendations to a T:

All of the above worked OK. From R was able to load both keras and tensorflow libraries without error. There is no reason to think that the installation was off base.

Then from R studio I encounter

library(tensorflow) library(keras) source('C:/Users/dalton/Desktop/trytensor/trytensoragain/R/tensorload.R') Error in python_config(python_version, required_module, python_versions) : Error 2 occurred running C:\Users\dalton\ANACON~1\python.exe

In addition: Warning messages:

1: In system2(command = python, args = paste0("\"", config_script, : running command '"C:\Users\dalton\ANACON~1\python.exe" "C:/Users/dalton/Documents/R/win-library/3.6/reticulate/config/config.py"' had status 2

2: In system2(command = python, args = paste0("\"", config_script, : running command '"C:\Users\dalton\ANACON~1\python.exe" "C:/Users/dalton/Documents/R/win-library/3.6/reticulate/config/config.py"' had status 2

3: In system2(command = python, args = paste0("\"", config_script, : running command '"C:\Users\dalton\ANACON~1\python.exe" "C:/Users/dalton/Documents/R/win-library/3.6/reticulate/config/config.py"' had status 2

 

 Then if trying from R console the error is python.exe-ordinal not found the ordinal 191 could not be located in the dynamic link library    So it seems R is not finding python, but I have no clue as to the fix. I have seen similar questions from Stackoverflow but no suitable solution. Maybe here.

Any volunteers will be welcome to enslave my computer to find a solution. It does not appear to be unique. Thus far I have had success by using Python from Spyder on Mac. Would rather use R.

LWD

lwdalton3 commented 5 years ago

This may be an anaconda issue as the same ordinal 191 error occurs when trying to open Spyder from Anaconda Navigator. Using spyder as a search tool I find the error mentioned on this site-- see link below. It seems this issue has not been resolved and can plague use of Rstudio. So please is there a fix?

My computer was a generous gift on Dec 25 2018 and all installations have been since then. I do not use any unusual software.

https://github.com/ContinuumIO/anaconda-issues/issues/10182

dfalbel commented 5 years ago

It seems that you had problems when installing reticulate. I try to uninstall and install Anaconda again before digging too much. Also, make sure you are not using the RStudio installation that comes inside Anaconda.

lwdalton3 commented 5 years ago

Daniel I did uninstall and reinstalled anaconda as well as R and R studio I did not install RStudio within anaconda. I will try to remove reticulate and install as separate package. It maybe that I will have to use Spyder on a Mac. The Spyder on windows via anaconda navigator gives the same ordinal 191 error as occurs with trying to use the R on windows.  So it has something to do with anaconda not having found the proper place for python. There appear to be work arounds but then in post from MSarahan who works for anaconda and as per prior email he warns against it and alludes to a fix. I can say there is no fix as yet. I do not have any clout to encourage a solution (or disclosure), but maybe you do. Anaconda does not seem to even answer their phones-- even the sales dept. It seems all testing at anaconda was on clean machines and maybe your tests were as well. My computer is semi-clean. My only work is with R and image analysis, and never stray into unusual locations. I am pretty good at C programming and thus am picking up Python fairly quick. However my expertise is limited to being within the language and not into all the strange working of various other software packages. Thus am rather helpless. But I do think this error may be creating problems with many other users who just give up without nagging. Thanks Les

On Thursday, August 1, 2019, 8:00:54 AM CDT, Daniel Falbel <notifications@github.com> wrote:  

It seems that you had problems when installing reticulate. I try to uninstall and install Anaconda again before digging too much. Also, make sure you are not using the RStudio installation that comes inside Anaconda.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

lwdalton3 commented 5 years ago

Hello

On Mac was able to perform what I needed using python on spyder via Anaconda-- in particular the dogs and cats example as per chaper 5 in the excellent book by Francois Chollet "Deep Learning with Python"

Unfortunately the Rstudio version of the same example in Chapter 5 of "Deep Learning with R" by Chollet and JJ Allaire tossed me a PIL error. This was the R version via Anaconda. But most functions worked and no ordinal 191 error. The install version of Rstudio with the Anaconda Navigator did not work and R had to be installed via github. I began from the R console.

I did not struggle with the PIL error since the python version worked. I imagine in my install, R is not locating the proper path to the python pillow module and I do not know the fix this.

It should be noted that Chollet did not recommend use of Windows, and he recommended that to work with tensorflow on a Windows computer one should install a dual boot (or partition) in order to have ubuntu (Linux). After ordinal 191 I would not argue with this recommendation.