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

Native kernel (python2) not available #1280

Closed
majure opened this issue Mar 30, 2016 · 14 comments
Closed

Native kernel (python2) not available #1280

majure opened this issue Mar 30, 2016 · 14 comments

Comments

@majure
Copy link

majure commented Mar 30, 2016

Jupyter notebook has broken for me, despite about a month of smooth use and no major changes to my setup. I have ipython 2.7.6 installed, and it still works. When I run jupyter notebook I get an error saying 'Native kernel (python2) is not available'. I have not found many solutions online that seem applicable to this situation.

@takluyver
Copy link
Member

I don't know how you've got there, but that error message means that it can't import ipykernel. If you install that package, it should work.

@majure
Copy link
Author

majure commented Mar 30, 2016

pip install ipykernel

Requirement already satisfied (use --upgrade to upgrade): ipykernel in /usr/local/lib/python2.7/dist-packages Cleaning up...
Pip claims it is already there. Is there an alternate way I should try to install it?

@takluyver
Copy link
Member

Maybe it's something that depends on that is missing. In a Python shell, can you try:

from ipykernel.kernelspec import RESOURCES

@majure
Copy link
Author

majure commented Mar 30, 2016

`---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
in ()
----> 1 from ipykernel.kernelspec import RESOURCES

/usr/local/lib/python2.7/dist-packages/ipykernel/init.py in ()
1 from ._version import version_info, version, kernel_protocol_version_info, kernel_protocol_version
----> 2 from .connect import *

/usr/local/lib/python2.7/dist-packages/ipykernel/connect.py in ()
12
13 from IPython.core.profiledir import ProfileDir
---> 14 from IPython.paths import get_ipython_dir
15 from ipython_genutils.path import filefind
16 from ipython_genutils.py3compat import str_to_bytes

ImportError: No module named paths
`

@takluyver
Copy link
Member

That means it's finding an old version of IPython somewhere - try uninstalling and reinstalling the IPython package. If you've installed IPython with something like apt, uninstall that copy.

@majure
Copy link
Author

majure commented Mar 30, 2016

I don't know how that showed up or why it wasn't a problem a few days ago, but that was it. sudo apt-get remove --purge ipython worked.

@takluyver
Copy link
Member

takluyver commented Mar 30, 2016 via email

@majure
Copy link
Author

majure commented Mar 30, 2016

Thanks.

@takluyver takluyver added this to the no action milestone Mar 30, 2016
@ducha-aiki
Copy link

@majure thank you very much!

@borisbolliet
Copy link

Thank you @majure, this worked for me too.

@xiaoyun4
Copy link

Thank you @majure, it worked for me.

@gregroberts
Copy link

If anyone is still having this issue, for me it was solved by simply running

pip install --upgrade ipykernel

without the need for uninstalling ipython entirely

@lifematrix
Copy link

@gregroberts it works for me too. Thanks!

@otayeby
Copy link

otayeby commented Feb 9, 2018

Thank you @gregroberts , I just want to note that this worked for me when I had the same error on PyCharm.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants