0

So i use anaconda for all this, the problem is when i try to do:

r = pyper.R(RCMD="D:/Apps/Anaconda/envs/rstudio/lib/R",use_pandas='True')

but then the error apear :


PermissionError                           Traceback (most recent call last)
<ipython-input-28-31688287b0f4> in <module>
----> 1 runningR("Dataset/ml-latest-small/ratings.csv")

<ipython-input-27-0e85c3dea21c> in runningR(fileName)
      2 
      3     #Rのインスタンスを作る
----> 4     r = pyper.R(RCMD="D:/Apps/Anaconda/envs/rstudio/lib/R",use_pandas='True')
      5 
      6     #r.assign("fileName", fileName) #fileNameとし引数のfileNameを渡す

D:\Apps\Anaconda\lib\site-packages\pyper.py in __init__(self, RCMD, max_len, use_numpy, use_pandas, use_dict, host, user, ssh, return_err, dump_stdout)
    598                 childstderr = file('nul', 'a')
    599 
--> 600         self.__dict__['prog'] = Popen(RCMD, stdin=PIPE, stdout=PIPE, stderr=return_err and _STDOUT or childstderr, startupinfo=info)
    601         self.__call__(self.Rfun)
    602 

D:\Apps\Anaconda\lib\subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors, text)
    767                                 c2pread, c2pwrite,
    768                                 errread, errwrite,
--> 769                                 restore_signals, start_new_session)
    770         except:
    771             # Cleanup if the child failed starting.

D:\Apps\Anaconda\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session)
   1170                                          env,
   1171                                          os.fspath(cwd) if cwd is not None else None,
-> 1172                                          startupinfo)
   1173             finally:
   1174                 # Child is launched. Close the parent's copy of those pipe

PermissionError: [WinError 5] Access is denied
  • `CreateProcessW` fails with `ERROR_ACCESS_DENIED` (5) if the executable file doesn't grant execute access (rare in Windows, especially on personal systems) or if you try to execute a directory. My guess would be that "D:/Apps/Anaconda/envs/rstudio/lib/R" is a directory. – Eryk Sun Apr 12 '19 at 10:18
  • Ok this really works, thanks! and the executable is in "\Scripts\R.exe" according to this : https://github.com/ContinuumIO/anaconda-issues/issues/777 – ALDY NOAH Apr 13 '19 at 06:14

0 Answers0