jupyter-c-kernel: PermissionError

Hi, I just installed the jupyter-c-kernel on my jupyterhub server (i installed it with sudo to have the kernel available for all the users). When I try to execute the simple hello world example i got this log in the notebook shell output:

[I 2016-06-07 04:51:13.171 epinux kernelmanager:89] Kernel started: 22a3c6c7-8932-4cf2-b377-b4f33f571430
gcc: error: /usr/local/lib/python3.5/dist-packages/jupyter_c_kernel-1.0.0-py3.5.egg/jupyter_c_kernel/../resources/master.c: No such file or directory
[IPKernelApp] ERROR | UNKNOWN MESSAGE TYPE: 'comm_open'
[IPKernelApp] ERROR | Exception in message handler:
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/ipykernel/kernelbase.py", line 228, in dispatch_shell
    handler(stream, idents, msg)
  File "/usr/local/lib/python3.5/dist-packages/ipykernel/kernelbase.py", line 391, in execute_request
    user_expressions, allow_stdin)
  File "/usr/local/lib/python3.5/dist-packages/jupyter_c_kernel-1.0.0-py3.5.egg/jupyter_c_kernel/kernel.py", line 135, in do_execute
    p = self.create_jupyter_subprocess([self.master_path, binary_file.name])
  File "/usr/local/lib/python3.5/dist-packages/jupyter_c_kernel-1.0.0-py3.5.egg/jupyter_c_kernel/kernel.py", line 112, in create_jupyter_subprocess
    lambda contents: self._write_to_stderr(contents.decode()))
  File "/usr/local/lib/python3.5/dist-packages/jupyter_c_kernel-1.0.0-py3.5.egg/jupyter_c_kernel/kernel.py", line 25, in __init__
    super().__init__(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, bufsize=0)
  File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.5/subprocess.py", line 1544, in _execute_child
    raise child_exception_type(errno_num, err_msg)
PermissionError: [Errno 13] Permission denied
[IPKernelApp] ERROR | Exception in message handler:
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/ipykernel/kernelbase.py", line 228, in dispatch_shell
    handler(stream, idents, msg)
  File "/usr/local/lib/python3.5/dist-packages/ipykernel/kernelbase.py", line 391, in execute_request
    user_expressions, allow_stdin)
  File "/usr/local/lib/python3.5/dist-packages/jupyter_c_kernel-1.0.0-py3.5.egg/jupyter_c_kernel/kernel.py", line 135, in do_execute
    p = self.create_jupyter_subprocess([self.master_path, binary_file.name])
  File "/usr/local/lib/python3.5/dist-packages/jupyter_c_kernel-1.0.0-py3.5.egg/jupyter_c_kernel/kernel.py", line 112, in create_jupyter_subprocess
    lambda contents: self._write_to_stderr(contents.decode()))
  File "/usr/local/lib/python3.5/dist-packages/jupyter_c_kernel-1.0.0-py3.5.egg/jupyter_c_kernel/kernel.py", line 25, in __init__
    super().__init__(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, bufsize=0)
  File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.5/subprocess.py", line 1544, in _execute_child
    raise child_exception_type(errno_num, err_msg)
PermissionError: [Errno 13] Permission denied

I guess is an issue on how I installed the kernel, thanks for looking into this.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

It seems the error was generated by a missed resource directory. Ii copied it from the src root into:

/usr/local/lib/python3.5/dist-packages/jupyter_c_kernel-1.0.0-py3.5.egg/

And now hello world works fine! 😃 I’ll test with more complex c code and I’ll report here if any problem. Thanks!