/在 Jupyter Notebook 中设置 Conda 环境

Created Tue, 15 Feb 2022 17:19:26 +0800 Modified Fri, 09 Aug 2024 13:25:47 +0000
125 Words 1 min
  1. 远程启动jupyter notebool

    jupyter notebook --no-browser --ip="<server-ip>" --port="<server-port>"
    
  2. 激活预先配置好的conda环境,这里假设环境名为keras-tf-2.1.0

    conda activate keras-tf-2.1.0
    
  3. 安装ipykernel

    pip3 install ipykernel --user
    
  4. ipykernel安装环境:

    python3 -m ipykernel install --user --name=keras-tf-2.1.0
    
  5. 打开notebook更改服务之后刷新即可:

    image-20220215172551183