How to install tensoflow-gpu on windows10
Use conda to create a TF2 virtual environment, python version is 3.6, use pip to install tensorflow, and in the import tensorflow according to the error prompt, install the corresponding cuda version.
The following are the instructions used.
1 | conda create tf2.0 |
问题
安装完tensorflow2.0 在import tensorflow报错不会提示需要cuda的版本。
解决方法
这个BUG网上找不到,于是换个思路:
安装不上2.0,安装1.0版本也可以。
执行下列代码
1 | conda create tf1.0 |
进入python后,执行import tensorflow,报错需要安装cuda8.0版本。
安装好cuda8.0后。import tensorflow继续报同样的错误。。。。。。。。
原因分析
1、可能是conda的原因,因为之前在Linux装软件的时候,用conda就会遇到奇怪的问题。
2、cuda没有成功
验证
先验证第二个原因,在网上找到如何验证成功安装cuda,发现成功安装cuda。接下来把conda卸载,自己手动安装python。