安装anaconda:
yay -S anaconda #仅适用于Arch Linux
建立Python虚拟环境:
conda create -n test_python_env
查看Python环境列表:
conda env list
激活Python虚拟环境:
conda activate test_python_env
或
source activate test_python_env
安装Python库:
conda install torch
或
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple torch
安装和配置Jupyter Notebook的Python内核:
conda install jupyter #之前装过的话无需再次安装
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple ipykerne
python -m ipykernel install --user --name=test_python_env
启动Jupyter:
jupyter notebook