How to Change Default kernel in jupyter notebook
See original GitHub issueI am using ipython 6.4.0 on ubuntu 20.04 and using jupyter kernelspec list
, I found, there are 2 kernels :
- practice_applied_ai
- python3
When I open any .ipynb file, it directly opens in “python3” but I want to open it in “practice_applied_ai” because I created virtual environment practice_applied_ai and only in this kernel I can import Tensorflow 2.2.0 for my work.
My question is, Is there any way to change my default kernel without removing any kernel ?
Issue Analytics
- State:
- Created 3 years ago
- Comments:8
Top Results From Across the Web
Change Default kernel in jupyter notebook - Stack Overflow
Not sure how to change the default kernel, but you can change the kernel being used in a notebook, after opening the notebook,...
Read more >How to change the kernel version in Jupyter Python Notebooks?
Open the Python Notebook and click on " Kernel " from the menu bar located on top of the python notebook. · Click...
Read more >Jupyter Kernel Selection — CoCalc Manual documentation
To select the kernel in a CoCalc Jupyter notebook, click the “Kernel” button (usually in the middle toolbar, depending on your configuration). In...
Read more >Jupyter Notebook Kernels: How to Add, Change, Remove
Add, remove and change Kernels to use with Jupyter notebook.
Read more >Change default kernel of jupyter notebook not working #3338
To confirm the default is in place, hit the kernelspecs REST API of your running notebook server (e.g., http://localhost:8888/api/kernelspecs) ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sir, Thank you so much for the help 😃
Yes, I checked now. I thought I can open other files which are used with different kernels in the kernel “practice_applied_ai”. I did not know that kernel name is part of file’s metadata. Now, I understood it.
Sounds like you’re doing the right thing.
If you’re opening existing notebook files, the kernel-name is part of the file’s metadata - so it will use that kernel. I’m not sure how to trigger the use of the “default kernel” other than from the REST API I described previously. The Notebook and Lab UIs require the user to select a kernel when creating notebooks and that selection is from the list of available kernels - which includes the default kernel (among others). You might have the wrong idea about when the default kernel name is used.
Another way to determine your configuration of a default kernel is working is to visit this URL via a web browser:
http://localhost:8888/api/kernelspecs
. This is much easier than issuing a POST request as I described previously.The response to visiting that URL is the set of kernelspec information. The first portion of which is the name of the default kernel. Again, you’ll see here the the ‘ir’ kernel is (now) configured as my default: