简体   繁体   English

如何解决'[WinError 5]访问被拒绝'

[英]How to fix '[WinError 5] Access is denied'

So i use anaconda for all this, the problem is when i try to do: 所以我使用anaconda来做这一切,问题是当我尝试做的时候:

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

but then the error apear : 但然后错误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

It seems that R is requiring administrator privileges to be accessed. 似乎R需要访问管理员权限。 However you're launching your environment (IDE/Anaconda), right click and 'Run as administrator'. 但是,您正在启动您的环境(IDE / Anaconda),右键单击并“以管理员身份运行”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM