新建环境

conda create -n my_env python=3.7

激活环境

conda activate my_env

在新建的环境中env安装jupyter

安装kernel

conda install ipykernel
conda install -c conda-forge ipywidgets

命名

python -m ipykernel install —user —name my_env —display-name “Python(my_env)”

安装jupyterlab

conda install jupyterlab

查看以及删除kernel

jupyter kernelspec list
jupyter kernelspec remove kernel_name

jupyter 修改默认打开路径

查看配置文件路径

jupyter notebook —generate-config

找到配置文件 jupyter_notebook_config.py打开

The directory to use for notebooks and kernels. # c.NotebookApp.notebook_dir = ‘’
Python 创建Environment 配置Jupyter - 图2
## The directory to use for notebooks and kernels. c.NotebookApp.notebook_dir = ‘你自己的工作路径’