Setting up a virtual environment for jupyter notebook

After create the virtual environment, start jupyter can’t find the environment, the solution is as follows:
1. First activate the virtual environment

activate py3

2. Install ipykernel

conda install ipykernel

3. Create the kernel file

conda install -n py3 ipykernel

4. Write the environment into the Notebook kernel

python -m ipykernel install --user --name py3 --display-name "py3"

The first Py3 is the name of the virtual environment, and the second Py3 is the name displayed in the Jupyter.

The process of creating the virtual environment is really bumpy. I just encountered another problem. After creating a new Notebook, it keeps showing that it is connecting to the service.
pip uninstall tornado pip install tornado==5.0.0

Reference links

add conda jupyter environment jupyter notebook open file times wrong: the connection to backend service failed to build a…

Read More: