PermissionError: [WinError 5] Access is denied
I ran the below code that was in the tutorial and I get the error below:
Code:
import cntk as C print(C.version)
with C.LocalExecutionContext('demo', clean_up=False) as ctx: a = C.constant([[1,2], [3,4]]) i = C.input_numpy([[[10,20], [30, 40]]]) print(ctx.eval(a + i))
Error:
File "C:\Users\jerinsh244\WinPython-64bit-3.4.4.4Qt5\python-3.4.4.amd64\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 845, in runfile execfile(filename, namespace)
File "C:\Users\jerinsh244\WinPython-64bit-3.4.4.4Qt5\python-3.4.4.amd64\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 103, in execfile exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/jerinsh244/Dropbox/projects/ML/cntk_test.py", line 7, in
File "C:\Users\jerinsh244\WinPython-64bit-3.4.4.4Qt5\python-3.4.4.amd64\lib\site-packages\cntk\context.py", line 762, in eval action_name = action_name)
File "C:\Users\jerinsh244\WinPython-64bit-3.4.4.4Qt5\python-3.4.4.amd64\lib\site-packages\cntk\context.py", line 423, in _call_cntk stderr=subprocess.STDOUT)
File "C:\Users\jerinsh244\WinPython-64bit-3.4.4.4Qt5\python-3.4.4.amd64\lib\subprocess.py", line 607, in check_output with Popen(_popenargs, stdout=PIPE, *_kwargs) as process:
File "C:\Users\jerinsh244\WinPython-64bit-3.4.4.4Qt5\python-3.4.4.amd64\lib\subprocess.py", line 859, in init restore_signals, start_new_session)
File "C:\Users\jerinsh244\WinPython-64bit-3.4.4.4Qt5\python-3.4.4.amd64\lib\subprocess.py", line 1114, in _execute_child startupinfo)
PermissionError: [WinError 5] Access is denied
The code leaves a cntk config file in a new folder in the directory of the script. If I run the config file separately using 'cntk configFile=eval.cntk' using the command prompt, I get the desired output.
I was trying out CNTK using the python API
With the Python API I get the same error with the tutorial: WindowsError: [Error 5] Access is denied
You should do the next: CNTK_EXECUTABLE_PATH -> T:\cntk\ CNTK.exe
Ah... Thanks a lot... I had added the directory 'T:\cntk' instead of the file to CNTK_EXECUTABLE_PATH.
It works now.
Closing the issue...