tensorflow 1.13.1 installed Pit

surroundings:

win10 x64位,cuda10.1,cudnn 7.5,vs2013,vs2015 distributed ,GTX1060

Follow the tutorial to install the Internet, as in the following blog

https://blog.csdn.net/huanyingzhizai/article/details/89298964

My last installation location: anaconda2 following virtual environments py3 following new virtual environment: tensorflow-gpu

Installation tensorflow library:

pit:

Including conda installation and pip installing the prompts to install successfully, but once import tensorflow as tf will direct error:

Tip dll failed to load the specified module can not be found.

Tried to reinstall many times, they are still the same, reported the same mistakes, because tensorflow cuda version and a version mismatch caused. My cuda version is 10.1, while the latest is tensorflow 1.13.1 (1.14.0 just left today not available for download), only supports cuda 10.0, and therefore always will be prompted dll failed to load. In other cuda version it is a bit large workload, caffe involve my torch and the environment, in particular caffe have to recompile, very troublesome, think about or forget, look for other ways can not solve.

Solution:

Why will prompt dll failed to load it? Are those dll failed to load it? ? Finally I found hope in a blog, referring to the blog:

https://blog.csdn.net/l_mingo/article/details/88110945

Open a command line method according to the blog, enter the following command to see which is dependent dll:

"c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\dumpbin.exe" /dependents C:\Users\username\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\_pywrap_tensorflow_internal.pyd

The next will depend on the output current tensorflow dll libraries:

Use the command line:: In accordance with the method where cublas64_100.dll blog in order to find these libraries are not in the path of the system, but only after I have used where this shows the following tips:

It's just suggesting these dll not found in the system path. However, I use a file search artifact (Everything) one by one these dll search again: as shown below

发现不在C:/windows/system32文件夹下,但是在其他很多文件夹中存在这个文件,然后我就按博客所说的,将搜到的这个dll随便复制一个放在C:/windows/system32文件夹下面就可以了。其他dll文件都找到了,但是有一个文件:cusolver64_100.dll ,搜遍了整个电脑都没有,但有一个cusolver64_10.dll,两个文件名挺像的,应该就是版本不一样吧:

试着将cusolver64_10.dll复制一份,重命名为cusolver64_100.dll,然后放到C:/windows/system32文件夹下,奇迹发生了,输入import tensorflow 没报错,接着输入下面两条命令试试能不能使用GPU:

from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())

竟然成功了,成功的打印了GPU信息,折腾了一天,终于搞定了。

总结:

我没有将cuda10.1换成其他版本,因为我的caffe和torch都是基于cuda10.1的,要是重新将cuda降级,工作量会更大,caffe得重新编译,torch得重装,还好解决了,环境问题真是头疼!

Guess you like

Origin blog.csdn.net/sinat_33486980/article/details/92838300