Conda使用指南,连接jupyter notebook

conda env list  #查看已有虚拟环境
conda config --add channe1s https://mirrors.tuna.tsinghua.edu .cn/anaconda/pkgs/free/
conda config --add channels 
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/conda config --set show_channe1_urls yes
#切换清华源
conda create -n test python=3.9 #创建新环境
conda activate test #切换新环境
conda deactivate  #退出,回到base
conda install ipykernel #虚拟环境中安装ipykernel
conda install -c conda-forge nb_conda #虚拟环境中安装nb_conda
然后cd 到目标文件夹,输入
jupyter notebook --NotebookApp.iopub_data_rate_limit=2147483647
可以解决notebook限制长度问题,进入后可以选择切换该环境的虚拟内核
conda create -n pytorch python=3.9  #安装pytorch
pip install torch==1.12.1+cu102 torchvision==0.13.1+cu102 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu102

https://blog.csdn.net/weixin_46334272/article/details/135307663

一只古灵古灵的精怪