參考博客https://blog.csdn.net/tong_he/article/details/78813494 操做可行python
Windows環境配置以下:app
1.打開默認conda環境:spa
(root) C:\Users\username>.net
2.選擇要在Jupyter Notebook中激活的env,並激活blog
(root) C:\Users\username>conda env list
# conda environments:
#
flappybird D:\ProgramData\Miniconda3\envs\flappybird
siraj-regression D:\ProgramData\Miniconda3\envs\siraj-regression
style-transfer D:\ProgramData\Miniconda3\envs\style-transfer
root * D:\ProgramData\Miniconda3
ip
(root) C:\Users\username>activate siraj-regressionget
3.在要激活的環境中安裝ipykernel博客
<siraj-regression>C:\Users\username> conda install ipykernelio
4.將選擇的conda環境注入Jupyter Notebookclass
<siraj-regression> C:\Users\username>python -m ipykernel install --user --name siraj-regressio
n --display-name "Python [conda env:siraj-regression]"
Installed kernelspec siraj-regression in C:\Users\pactera\AppData\Roaming\jupyte
r\kernels\siraj-regression
格式: python -m ipykernel install --user --name [要設置的conda中的環境] --display-name [在Jupyter Notebook中要顯示的環境變量]
5.conda root環境下打開Jupyter Notebook便可,在打開的UI界面便可看到已加載的內核。
(root) C:\Users\username>jupyter notebook
完成上面操做後在Jupyter上新建腳本時,能夠選擇不一樣的環境以下