Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find kernel #268

Closed
nattanyz opened this issue May 27, 2021 · 2 comments
Closed

Cannot find kernel #268

nattanyz opened this issue May 27, 2021 · 2 comments
Labels
bug Installation and functionality issues wait for answer The issue waits for opener's action or answer

Comments

@nattanyz
Copy link

Hi, I am not able to use the Kotlin kernel after installing both it and Jupyter using pip3.
I have also tried the fix-kernelspec-location script:

% python -m kotlin_kernel fix-kernelspec-location
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named kotlin_kernel
% python3 -m kotlin_kernel fix-kernelspec-location

To reproduce the error:

  1. I start a Jupyter session using jupyter lab.
  2. I am still only able to use the Python3 kernel, as shown in the screenshot below:
    Screenshot 2021-05-27 at 1 16 34 PM

Any help is appreciated! I'm fairly new to setting up Python environments and have gotten myself confused with Anaconda, virtual environments and the like before, so I'm opting to keep things simple using just pip3 for now.

Here's more explanation of my installation process:
While installing Jupyter using pip3 install jupyter, I encountered the following error at the end:

ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/usr/local/etc/jupyter/nbconfig/notebook.d/widgetsnbextension.json'
Consider using the `--user` option or check the permissions.

Googling this error did not provide any hints.
I then ran pip3 install jupyterlab. At this point, trying jupyter lab produced this error: 'ExtensionManager' object has no attribute '_extensions', which I surmise is linked to this issue: jupyterlab/jupyterlab#10228
I tried the fix on that page, i.e. jupyter server extension disable nbclassic.
Next, I uninstalled and reinstalled the Kotlin kernel using pip3 uninstall kotlin-jupyter-kernel followed by pip3 install kotlin-jupyter-kernel.
Below is the output:

Collecting kotlin-jupyter-kernel
  Downloading kotlin_jupyter_kernel-0.10.0.40-py3-none-any.whl (70.5 MB)
     |████████████████████████████████| 70.5 MB 9.4 MB/s 
Installing collected packages: kotlin-jupyter-kernel
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/usr/local/share/jupyter/kernels/kotlin'
Consider using the `--user` option or check the permissions.

Thank you!

@ileasile
Copy link
Collaborator

Hello, @nattanyz!

As I see, you don't have enough permissions to install the package

Could not install packages due to an OSError: [Errno 13] Permission denied

Try --user option as PIP suggested:

pip3 install --user kotlin-jupyter-kernel==0.10.0.40

Then fix the location:

python -m kotlin_kernel fix-kernelspec-location

Another possible fix: try to install the package with sudo:

sudo pip3 install kotlin-jupyter-kernel==0.10.0.40

@ileasile ileasile added bug Installation and functionality issues wait for answer The issue waits for opener's action or answer labels May 30, 2021
@nattanyz
Copy link
Author

nattanyz commented Jul 5, 2021

Hey, thanks and sorry for the late reply! Haven't been able to revisit this in a while.

sudo installing the package worked - thanks :)

@nattanyz nattanyz closed this as completed Jul 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Installation and functionality issues wait for answer The issue waits for opener's action or answer
Projects
None yet
Development

No branches or pull requests

2 participants