一、步骤
1.先cmd进入anaconda的base环境
2.然后创建新环境:conda create -n your_env_name(虚拟环境名称) python==xx
3.然后在这里面装torch环境,注意需要先去torch官网 看看与自己cuda匹配的torch版本是多少
torch官网网址:https://pytorch.org/
比如:conda install pytorch==1.13.0 torchvision==0.14.0 torchaudio==0.13.0 pytorch-cuda=11.6 -c pytorch -c nvidia
4.在环境里面装jupyter: conda install -y jupyter 或者pip install jupyter
5.给环境设置内核名字 这样才能在anaconda内核那里选中:
conda install ipykernel
python -m ipykernel install --name xxx
6.在jupyternotebook查看是否可用