Coder Social home page Coder Social logo

Comments (7)

kl2792 avatar kl2792 commented on June 3, 2024

Same; I get this error.

clang: error: no such file or directory: '/usr/local/lib/python3.6/site-packages/jupyter_c_kernel/../resources/master.c'
[IPKernelApp] ERROR | Exception in message handler:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 228, in dispatch_shell
    handler(stream, idents, msg)
  File "/usr/local/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 390, in execute_request
    user_expressions, allow_stdin)
  File "/usr/local/lib/python3.6/site-packages/jupyter_c_kernel/kernel.py", line 161, in do_execute
    p = self.create_jupyter_subprocess([self.master_path, binary_file.name] + magics['args'])
  File "/usr/local/lib/python3.6/site-packages/jupyter_c_kernel/kernel.py", line 113, in create_jupyter_subprocess
    lambda contents: self._write_to_stderr(contents.decode()))
  File "/usr/local/lib/python3.6/site-packages/jupyter_c_kernel/kernel.py", line 26, in __init__
    super().__init__(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, bufsize=0)
  File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 707, in __init__
    restore_signals, start_new_session)
  File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 1326, in _execute_child
    raise child_exception_type(errno_num, err_msg)
PermissionError: [Errno 13] Permission denied

from jupyter-c-kernel.

ykun91 avatar ykun91 commented on June 3, 2024

I have the same problem. there is no resources/master.c in site-packages after pip install.

from jupyter-c-kernel.

kl2792 avatar kl2792 commented on June 3, 2024

^ the C Kernel works for me with that patch. Try it out and let me know if anything needs to be changed.

from jupyter-c-kernel.

liuhu-bigeye avatar liuhu-bigeye commented on June 3, 2024

Same error with above. @misolietavec solution fixed this problem. Hope that will be fixed in pip package later.

from jupyter-c-kernel.

kl2792 avatar kl2792 commented on June 3, 2024

Interesting. That solution actually didn't work for me. I'm on MacOS Sierra.

from jupyter-c-kernel.

MarioJose avatar MarioJose commented on June 3, 2024

I get the same error.

When I open jupyter I get this message:

$ jupyter-notebook 
[W 10:17:12.034 NotebookApp] Widgets are unavailable. On Debian, notebook support for widgets is provided by the package jupyter-nbextension-jupyter-js-widgets
[I 10:17:12.047 NotebookApp] Serving notebooks from local directory: /home/mario
[I 10:17:12.047 NotebookApp] 0 active kernels 
[I 10:17:12.047 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/
[I 10:17:12.047 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 10:17:22.392 NotebookApp] Creating new notebook in /Downloads
[I 10:17:23.479 NotebookApp] Kernel started: e7563bd2-5f77-48ee-96a1-0a1a4997d971
[W 10:17:23.652 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20171030101711 (::1) 12.75ms referer=http://localhost:8888/notebooks/Downloads/Untitled1.ipynb?kernel_name=bash
gcc: error: /home/myuser/.local/lib/python3.5/site-packages/jupyter_c_kernel/../resources/master.c: No such file or directory

In jupyter I try execute a simple c example and get this error:

[IPKernelApp] ERROR | Exception in message handler:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ipykernel/kernelbase.py", line 228, in dispatch_shell
    handler(stream, idents, msg)
  File "/usr/lib/python3/dist-packages/ipykernel/kernelbase.py", line 390, in execute_request
    user_expressions, allow_stdin)
  File "/home/myuser/.local/lib/python3.5/site-packages/jupyter_c_kernel/kernel.py", line 161, in do_execute
    p = self.create_jupyter_subprocess([self.master_path, binary_file.name] + magics['args'])
  File "/home/myuser/.local/lib/python3.5/site-packages/jupyter_c_kernel/kernel.py", line 113, in create_jupyter_subprocess
    lambda contents: self._write_to_stderr(contents.decode()))
  File "/home/myuser/.local/lib/python3.5/site-packages/jupyter_c_kernel/kernel.py", line 26, in __init__
    super().__init__(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, bufsize=0)
  File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.5/subprocess.py", line 1282, in _execute_child
    raise child_exception_type(errno_num, err_msg)
PermissionError: [Errno 13] Permission denied

Then, I created a folder named resources in "/home/myuser/.local/lib/python3.5/site-packages" and download "master.c" in it. This solve my problem.

I think the problem is that install script is not creating resources folder and put "master.c" in it.

All the best,

Mario

from jupyter-c-kernel.

Daniel-M avatar Daniel-M commented on June 3, 2024

I can confirm the issue with Python 3.6.3 with Jupyter 4.4.0 with Jupyter-c-kernel installed from pip repositories.

In addition, there's an execution problem with the temporal executables created at /tmp

A typical log is,

[I 10:03:30.524 NotebookApp] Kernel started: 7f6ade06-ed54-4d64-8a24-d4c992197871
gcc: error: /usr/local/lib/python3.6/dist-packages/jupyter_c_kernel/../resources/master.c: No existe el fichero o el directorio
[I 10:03:31.570 NotebookApp] Adapting to protocol v5.1 for kernel 7f6ade06-ed54-4d64-8a24-d4c992197871
[IPKernelApp] ERROR | Exception in message handler:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/ipykernel/kernelbase.py", line 235, in dispatch_shell
    handler(stream, idents, msg)
  File "/usr/local/lib/python3.6/dist-packages/ipykernel/kernelbase.py", line 399, in execute_request
    user_expressions, allow_stdin)
  File "/usr/local/lib/python3.6/dist-packages/jupyter_c_kernel/kernel.py", line 161, in do_execute
    p = self.create_jupyter_subprocess([self.master_path, binary_file.name] + magics['args'])
  File "/usr/local/lib/python3.6/dist-packages/jupyter_c_kernel/kernel.py", line 113, in create_jupyter_subprocess
    lambda contents: self._write_to_stderr(contents.decode()))
  File "/usr/local/lib/python3.6/dist-packages/jupyter_c_kernel/kernel.py", line 26, in __init__
    super().__init__(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, bufsize=0)
  File "/usr/lib/python3.6/subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: '/tmp/tmp35x3mr4y.out'

from jupyter-c-kernel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.