- conda配置清华源
创建文件
vim .condarc
添加以下内容
channels:
- defaults
show_channel_urls: true
default_channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch-lts: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
清理缓存
conda clean -i
- 安装jupyterlab
pip install jupyterlab
- 生成配置文件
jupyter lab --generate-config
- 在生成的配置文件中添加以下内容
c.ServerApp.ip = '*'
c.ServerApp.allow_remote_access = True
c.ServerApp.port = 8888
# 服务器上并没有浏览器可以供Jupyter打开
c.ServerApp.open_browser = False
- 创建内核
conda create -n py3env python=3.8 ipykernel
conda activate py3env
python -m ipykernel install --user --name py3env --display-name "py3env"