我是先安装的cuda11.2,tensorflow2.4.1,但是2.X版本的tensorflow有些函数会有改动,于是我又降级tensorflow,但是此时cuda版本不匹配,我以为高版本的cuda会自动适合低版本的tensorflow,但是不是这样的,所以,我又重新安装cuda10.0,cudnn7.6.5和tensorflow1.13。将遇到的问题记录下来。
Failed to load the native TensorFlow runtime. See https://www.tensorflow.org/install/errors for some common reasons and solutions. Include the entire stack trace above this error message when asking for help.
问题:tensorflow的版本和cuda版本不兼容,我是降级了cuda,卸载比较新的版本,安装就版本。
卸载注意问题:1、保留NVIDIA图形处理程序,NVIDIA physX系统软件;2、深度卸载,注册表中的记录也要删除,安装一下杀毒软件,可以帮助清除。(我是按照博客上别人的教程卸载的,不清除如果卸载不干净会有什么影响)
安装需要注意问题:1、基本步骤还是和第一遍安装一样,但是我第一遍安装时,基本cuda默认的组件都安装了,但是有一些是不需要安装的,具体可以参照这篇博客的cuda安装部分。
2、cudnn安装步骤也和之前一样,最后,环境变量部分,我没有按照别人教的那样设置,而是参照这篇博客最后的验证部分,分别
使用cmd进入这个目录:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\extras\demo_suite
然后输入bandwidthTest.exe
然后输入:deviceQuery.exe
如果两步都出现PASS,说明整个环境配置正确。
ImportError: Could not find 'cudart64_80.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 8.0 from this URL: https://developer.nvidia.com/cuda-toolkit
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath' ImportError: numpy.core.multiarray failed to import The above exception was the direct cause of the following exception: Traceback (most recent call last): File "<frozen importlib._bo
解决链接:https://blog.csdn.net/weixin_41010198/article/details/86738635
numpy版本和当前的tensorflow版本不兼容,更新numpy版本,输入:pip install --upgrade numpy
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
-ensorflow-gpu 2.4.1 requires tensorboard~=2.4, but you have tensorboard 1.13.1 which is incompatible.
-ensorflow-gpu 2.4.1 requires tensorflow-estimator<2.5.0,>=2.4.0, but you have tensorflow-estimator 1.13.0 which is incompatible.
解决连接:https://blog.csdn.net/weixin_43582443/article/details/111478698
重新安装这两个包:pip install tensorboard,pip install tensorflow-estimator