安装tensorflow:pip install tensorflow-cpu
安装torch:pip install torch=1.5.1 torchvision=0.6.1 -f https://download.pytorch.org/whl/torch_stable.html
安装这两个之前我都从github上下载了相应的包,并放到了anaconda3/pkgs目录下边,不知道具体安装的时候有没有用到
安装完torch使用的时候报错:
FileNotFoundError: Could not find module ‘D:\anaconda3\lib\site-packages\torch\lib\caffe2_nvrtc.dll’ (or one of its dependencies). Try using the full path with constructor syntax.
又卸载pip uninstall torch
然后又安装cpu版本:
conda install pytorch torchvision cpuonly -c pytorch
然后就没有问题了
安装进度条不动的时候,按住ctrl+c就动了,不知道为啥。
window上安装tensorflow和torch
最新推荐文章于 2024-06-07 20:29:40 发布