Jupyter Notebook virtual environment using Anaconda

Creation and use of virtual environments procedure see: Anaconda virtual environment


Step 1: Install ipykernel:

Act One:
1. Go to the virtual environment

  • Windows: In Anaconda Prompt, run activate myenv
  • macOS & Linux, in Terminal, run source activate myenv
  1. Installation ipykernel:conda install ipykernel

Act II:
can be run directly in any environment conda install -n myenv ipykernelis myenv installation ipykernel

Step two: the kernel is written in the notebook environment

  1. First, to ensure in the current virtual environment, enter the virtual environment of the process as a first step in the process.
  2. Running python -m ipykernel install --user --name=myenvkernel environment will be written in the notebook

At this point, enter Jupiter notebook in the current environment to enter the notebook
Here Insert Picture Description

You can also select our virtual environment in the Notebook
Here Insert Picture Description

Published 673 original articles · won praise 644 · views 380 000 +

Guess you like

Origin blog.csdn.net/zhaohaibo_/article/details/103919336