Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing multiple Python 3 kernels in iPython/Jupyter Notebooks

I have Python 3.7 and 3.8 on my system.

I have run pip install on both 3.7 and 3.8 for jupyter notebook, however when trying to create a new notebook, the kernel list only shows one value for "Python 3"

How do I get both Python 3.7 and 3.8 to show up here?

like image 821
gazm2k5 Avatar asked Oct 29 '25 05:10

gazm2k5


1 Answers

You have to install the kernel on jupyter. You can do this in command prompt/bash terminal:

jupyter kernelspec list

This will return all the currently installed kernels for jupyter notebooks.

It's best to run a virtual environment for each project you have. Activate your venv, and then you can install the Python kernel for use within a jupyter notebook with this bash command:

ipython kernel install --user --name=projectname

Note this installed kernel will also be available to jupyter when from outside the venv.

You can uninstall kernels with the following:

jupyter kernelspec uninstall <name of kernel>

See here for more details: https://ipython.readthedocs.io/en/stable/install/kernel_install.html

There are also instructions in there for installing multiple python kernels without using a virtual environment.

like image 60
gazm2k5 Avatar answered Oct 30 '25 22:10

gazm2k5



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!