'Python New Env created by Anaconda Prompt not showing in Jupyter Notebook kernel list

I created a new python env using Anaconda Prompt by using the following steps:

conda create --name py3-TF2.0 python=3

conda activate py3-TF2.0

conda install tensorflow

pip install --upgrade tensorflow

pip install ipykernel

then i restarted anaconda and opened jupyter notebook. The problem is when i open a new notebook and go to kernel to choose the new env i could not find the env i created (p3-TF2.0)

however, when I use conda info --envs, i find the new env created.

what is missing here?

thanks in advance



Solution 1:[1]

After activating the environment, try running:

python -m ipykernel install --user --name py3-TF2.0 --display-name "py3-TF2.0"

If this still isn't pointing to the correct environment (i.e. you can't import packages you know you installed in that environment), remove the py3-TF2.0 kernel that's broken with jupyter kernelspec remove py3-TF2.0.

Then run <your_path_to>/anaconda3/envs/py3-TF2.0/bin/python -m ipykernel install --user --name py3-TF2.0 --display-name "py3_TF2.0".

Additional help on Jupyter Kernels.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1