Coder Social home page Coder Social logo

Comments (15)

epifanio avatar epifanio commented on June 3, 2024 1

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!

from jupyter-c-kernel.

brendan-rius avatar brendan-rius commented on June 3, 2024

Hi thank you for the feedback, could you tell me how you tried to install it exactly so I can try to reproduce the bug?

from jupyter-c-kernel.

epifanio avatar epifanio commented on June 3, 2024

Hi @brendan-rius
I installed jupyter-c-kernel on a Linux server running debian sid with system python3 v 3.5.1+ and jupyter v 4.1.0 using:

mkdir dev
cd dev
git clone https://github.com/brendan-rius/jupyter-c-kernel
cd jupyter-c-kernel
sudo python3 setu.py install
cd jupyter-c-kernel
sudo jupyter-kernelspec install c_spec/

from jupyter-c-kernel.

epifanio avatar epifanio commented on June 3, 2024

Hi @brendan-rius , is the installation process correct? should I repeat it or change something?
I updated my clone and re-tried the installation (I also executed the install script ) but i still have permission error. Looking into the source now. Thanks for any advice.

from jupyter-c-kernel.

brendan-rius avatar brendan-rius commented on June 3, 2024

Thank you for raising that issue; it might be because of the way you installed it (using directly the setup.py and not pip). Maybe this way of doing does not copy the resource files. If so, it is a bug to fix, and I will take a look as soon as I can.

I am not closing the issue

from jupyter-c-kernel.

zbeekman avatar zbeekman commented on June 3, 2024

There are problems in the docker image too... the sudo/root install makes certain thinks owned by root when they should be owned by $NB_USER.

from jupyter-c-kernel.

brendan-rius avatar brendan-rius commented on June 3, 2024

Fixed in the new version (1.2.0)
Please refer to the README on how to install :)

from jupyter-c-kernel.

nickyfoto avatar nickyfoto commented on June 3, 2024

I installed c-kernel with pip3 on OS X 10.12.6 it still produces PermissionError: [Errno 13] Permission denied error when I try to run C code.

I copied the folder and file resources/master.c to /usr/local/lib/python3.6/site-packages/ to solve this problem

from jupyter-c-kernel.

brendan-rius avatar brendan-rius commented on June 3, 2024

Can you run

pip show jupyter-c-kernel

and give me the version number you are using? Make sure it is at least 1.2.0
If it is not, please upgrade it:

pip install --upgrade jupyter-c-kernel

Tell me if it works

from jupyter-c-kernel.

nickyfoto avatar nickyfoto commented on June 3, 2024

Yes I installed 1.2.0. The same problem happens when I try to install it on a Ubuntu server on Digital Ocean. The docker works fine.

āžœ  ~ pip3 show jupyter-c-kernel
Name: jupyter-c-kernel
Version: 1.2.0
Summary: Minimalistic C kernel for Jupyter
Home-page: https://github.com/brendanrius/jupyter-c-kernel/
Author: Brendan Rius
Author-email: [email protected]
License: UNKNOWN
Location: /usr/local/lib/python3.6/site-packages
Requires:

from jupyter-c-kernel.

brendan-rius avatar brendan-rius commented on June 3, 2024

Just created a DO droplet on Ubuntu 16.04.3 x64, then ran the following commands:

apt update
apt install python3-pip
pip3 install jupyter
pip3 install jupyter-c-kernel
install_c_kernel

and it works fines.

Anyway, it looks like you have a permission problem. Could you try to run

install_c_kernel --user

That will install the kernel for only the current user, and not globally. That is what the Docker does

from jupyter-c-kernel.

snailkn avatar snailkn commented on June 3, 2024

I have the same trouble in on OS X 10.12.6, I found the dir resources is not installed successfully. Finally I copy the dir to the target dir and solve the bug.

from jupyter-c-kernel.

brendan-rius avatar brendan-rius commented on June 3, 2024

This is weird, do you have any error message or weird behaviour while installing?

Could you please send me the exact installation steps you used so I can try to reproduce the same thing? (it works on my Mac, and on DO)

from jupyter-c-kernel.

albertmundu avatar albertmundu commented on June 3, 2024

I am getting the same error. I installed using the readme file

pip install jupyter-c-kernel
install_c_kernel

Because I am using virtualenv I used

(deep) user jupyter_programs$ install_c_kernel --sys-prefix
Installing IPython kernel spec

(deep) user jupyter_programs$ install_c_kernel --help
usage: install_c_kernel [-h] [--user | --sys-prefix | --prefix PREFIX]

Install KernelSpec for C Kernel

optional arguments:
  -h, --help       show this help message and exit
  --user           Install KernelSpec in user homedirectory
  --sys-prefix     Install KernelSpec in sys.prefix. Useful in conda /
                   virtualenv
  --prefix PREFIX  Install KernelSpec in this prefix

Error Log

IPKernelApp] ERROR | Exception in message handler:
Traceback (most recent call last):
  File "/home/user/virtualenvs/deep/lib/python3.5/site-packages/ipykernel/kernelbase.py", line 235, in dispatch_shell
    handler(stream, idents, msg)
  File "/home/user/virtualenvs/deep/lib/python3.5/site-packages/ipykernel/kernelbase.py", line 399, in execute_request
    user_expressions, allow_stdin)
  File "/home/user/virtualenvs/deep/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/user/virtualenvs/deep/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/user/virtualenvs/deep/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 947, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
    raise child_exception_type(errno_num, err_msg)
PermissionError: [Errno 13] Permission denied

I cannot find a valuable solution to this

from jupyter-c-kernel.

indajuan avatar indajuan commented on June 3, 2024

Hello,
Could you please help me with the installation on Ubuntu 17.04?
I followed the instructions:

  • pip install jupyter-c-kernel
  • install_c_kernel

install_c_kernel returned an error, permission denied.

So I tried with install_c_kernel --user and it worked out fine.

Nevertheless, if I run the notebook with the hello world example ( or any code), the kernel does not return any output, it just runs but it does not return anything. It does however, send error messages if the code is wrong.

Thanks,

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.