查看版本信息常用指令:
-V 与 --v (ersion)等价。
持续更新······
查看conda版本:
conda -V
补充:利用conda创建虚拟环境:
conda create -n test
#test是自己设置的虚拟环境名字
#进入虚拟环境
conda activate test
#退出虚拟环境
conda deactivate
补充:创建conda的清华源镜像
conda config --add channels 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_channel_urls yes
再换回默认源:
conda config --remove-key channels
查看CUDA版本:
nvcc -V
查看PyTorch以及相应CUDA版本:
import torch
print(torch.__version__)
print(torch.version.cuda)
或者直接在命令行里输入:
python -c "import torch; print(torch.__version__)"
python -c "import torch; print(torch.version.cuda)"