可以直接点下面的Terminal或者连自己的开发机
mkdir test && cd test # 创建虚拟环境 python3 -m venv venv # 激活环境 source venv/bin/activate # 下载ipykernel pip3 install ipykernel
python3 -m ipykernel install --user --name 内核名(在kernelspec中显示) --display-name "内核显示名称(在页面中会显示)"
(venv) [root@test test] python3 -m ipykernel install --user --name py36 --display-name="test py" # Installed kernelspec py36 in /root/.local/share/jupyter/kernels/py36
[root@test ~] jupyter kernelspec list # Available kernels: # py36 /root/.local/share/jupyter/kernels/py36 # python3 /usr/local/share/jupyter/kernels/python3"""
jupyter kernelspec remove [内核名字] -y
jupyter kernelspec remove py36 -y # [RemoveKernelSpec] Removed /root/.local/share/jupyter/kernels/py36