Jupyter Notebook configure multiple python virtual environment notes

Open anconda prompt

The first form

1. View the existing virtual environment
conda env list
or: conda info -e
2. Create a new virtual environment
conda create -n the name of your virtual environment python=version number ipykernel
eg:
conda create -n py36 python=3.6. 8 ipykernel
3. Activate the new environment
conda activate the name of your virtual environment
eg:
conda activate py36
4. Generate the configuration file in the directory of this account, and add the name of the environment in the list
python -m ipykernel install --name python36

5. Exit the virtual environment
conda deactivate

The second form

conda info -e
conda create -n python36 python=3.6.8
activate python36
jupyter notebook 可以去看一下,发现还没有在里面
conda.bat activate python36
pip install ipykernel 装一下内核
python -m ipykernel install --name python36  加环境的名称在列表里
jupyter notebook

Guess you like

Origin blog.csdn.net/qq_46009608/article/details/114921933