Conda安装老版本Tensorflow1.13.1
conda create -n tensorflow131 python=3.7
conda install cuda
conda install cudatoolkit=10.0
conda install cudnn=7.3.1
pip install tensorflow-gpu==1.13.1
在确保显卡驱动安装好的情况下,使用上述指令即可以完成安装。
在虚拟环境中安装cuda,而不修改本地版本
如果报错
mportError: Could not find ‘cudnn64_7.dll’. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Note that installing cuDNN is a separate step from installing CUDA, and this DLL is often found in a different directory from the CUDA DLLs. You may install the necessary DLL by downloading cuDNN 7 from this URL: https://developer.nvidia.com/cudnn
则将tensorflow的虚拟环境添加到系统path路径