Jupyter notebook virtual environment (windows 10)

Hi,πŸ‘‹ in this article I suppose that you already created your virtual environment and you already use anaconda.

1- Open anaconda prompt

(base) C:\Users\Me>

2- Type the command: conda env list this command will give you all virtual environments that you have already created πŸ‘‡:

(base) C:\Users\Me>conda env list

3- Choose the virtual env that you want,(in my case I choose the environment "tf_2-4_jupyter") then activate it with this command :

conda activate your chosen virtual environment

(base) C:\Users\My>conda activate tf_2-4_jupyter 

(tf_2-4_jupyter) C:\Users\My>

4- Install "ipykernel" with the command pip install --user ipykernel

(tf_2-4_jupyter) C:\Users\My>pip install --user ipykernel

if you successfully installed it πŸ‘ you will got this message:

"Successfully installed ipykernel-5.5.5 jupyter-client-6.1.12 jupyter-core-4.7.1 pywin32-301 pyzmq-22.1.0 tornado-6.1"

5-  Type python -m ipykernel install --user --name=your chosen environment

(tf_2-4_jupyter) C:\Users\My> python -m ipykernel install --user --name=tf_2-4_jupyter

you will got this message:

Installed kernelspec tf_2-4_jupyter in C:\Users\My\AppData\Roaming\jupyter\kernels\tf_2-4_jupyter

6- πŸ˜ƒ Congratulation, now you can launch the jupyter notebook with the command python -m notebook

(tf_2-4_jupyter) C:\Users\My>python -m notebook

7- If the Netbook is launchedπŸ‘Œ, congratulation, now you go to "New" and you will find your virtual environment.


That's all  ✌





Comments