Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jupyter Notebook only has Python [conda root] and Python [default] kernels

I followed all the steps outlined in the other Python [root] posts, but still cannot get the python2 and python3 kernels to show up.

Here is what my Jupyter notebook shows:

Jupyter notebook

and here is the startup log:

enter image description here

I have Anaconda3 installed (the 3.5 version).

How do I get the python2 and python3 kernels to show up?

like image 549
giantsrock28 Avatar asked Aug 23 '16 03:08

giantsrock28


People also ask

Does each Jupyter Notebook have its own kernel?

When you open a notebook in edit mode in a Spark environment, a dedicated Spark cluster is started, even if another notebook was opened in the same Spark environment template. Each notebook kernel has its own Spark driver and set of Spark executors. No resources are shared.

Should I use conda or pip in Jupyter Notebook?

pip is the default package manager that ships with python. Conda is also a package manager, but it is third party. Conda was made especially for data science libraries. Libraries installed with conda usually give much better performance than pip.

Do you need conda for Jupyter Notebook?

The general recommendation is that you use the Anaconda distribution to install both Python and the Jupyter Notebook. Jupyter Notebook in Anaconda comes pre-installed, meaning that you do not have to install it explicitly.


3 Answers

I have the similar situation as yours and I solved it through:

  1. Switch to the conda env you wanna show in Jupyter notebook

>>> source activate conda_env_name

  1. Install/reinstall Jupyter under this env using:

(conda_env_name)>>> conda install jupyter

You should be able to see your env under Jypyter Kernel->Change kernels lists (this is my first stackoverflow answer, hope it helps you)

like image 137
Penny Qian Avatar answered Oct 24 '22 18:10

Penny Qian


I had a similar issue but i had python 2.7.12 installed from anaconda and the default one came with Mac is 2.7.10.

When i open jupiter notebook, i used to get Python[conda root] and Python[default], after lot of struggling i did the following

conda update conda

conda uninstall ipython

conda install jupyter

now i see only 'Python 2' in my Jupiter notebook

hope this helps

like image 26
ABALA Avatar answered Oct 24 '22 19:10

ABALA


I was stucked like you, and the solution is easy: For more information: https://docs.continuum.io/anaconda/jupyter-notebook-extensions#notebook-conda

In the HOME of jupiter Notebook you will find: Files, Running, Clusters and Conda Select Conda Then there is a space for the conda environments, there is a sign +, clic on it to add a new environment, here you can select conda 2 or 3, depends on you, and give a name, it could be the same name Conda 3. After that you refresh environment list, and then close jupyter notebook. Finally, open it again, and it should works.

like image 1
Diana Avatar answered Oct 24 '22 19:10

Diana