美文网首页
因tensorflow版本问题造成的error

因tensorflow版本问题造成的error

作者: xssxx | 来源:发表于2018-05-25 10:00 被阅读0次

1.

```

Traceback (most recent call last): File "model_VQA.py", line 2, inimport tensorflow as tf File "/home/supermicro/.local/lib/python2.7/site-packages/tensorflow/__init__.py", line 23, infrom tensorflow.python import * File "/home/supermicro/.local/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 48, infrom tensorflow.python import pywrap_tensorflow File "/home/supermicro/.local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in _pywrap_tensorflow = swig_import_helper()

  File "/home/supermicro/.local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper

    _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)

ImportError: libcudart.so.7.5: cannot open shared object file: No such file or directory

```

这个问题有可能是因为没有

```$ cd /usr/local/cuda/lib64

$ $ln -s libcudart.so libcudart.so.7.5

```另一个原因就是tensorflow版本不对,没有安装gpu的版本(我的环境是python2.7,cuda8.0,opencv3.1.0安装的tensorflow-gpu 1.0.1```

pip install tensorflow-gpu==1.0.1 --user```)

2.```*** Error in `python': free(): invalid next size (fast): 0x00007f297c012430 ***

======= Backtrace: =========

/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f2b563e97e5]

/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7f2b563f237a]

/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f2b563f653c]

/usr/lib/nvidia-390/libnvidia-fatbinaryloader.so.390.48(+0x1d05a)[0x7f2af94b205a]

/usr/lib/nvidia-390/libnvidia-fatbinaryloader.so.390.48(+0x11c73)[0x7f2af94a6c73]

......```以上问题也是tensorflow版本问题在我安装完正确版本的tensorflow的版本后自动消失。记得pip list看看有没有其他版本的tensorflow要先卸载其他版本的tensorflow哦!

最后tucao一句,配置环境真让人抓狂,一搞就大半天,不过半路出家也只能摸着石头过河啦!

最后如果版本过老可以```pip install -U tensorflow```更新一波!

相关文章

网友评论

      本文标题:因tensorflow版本问题造成的error

      本文链接:https://www.haomeiwen.com/subject/geryjftx.html