3.14

作者: M子墨 | 来源:发表于2018-03-15 23:51 被阅读0次

    今天继续在虚拟机上搭建tensorflow环境。

    遇到了几个问题:

    1、“IOError: [Errno 13] Permission denied:”ubuntu的权限问题,最后用一行“sudo su"解决了。

    2、起初错装了gpu的tensorflow(https://mirrors.tuna.tsinghua.edu.cn/tensorflow/linux/),可以成功安装但无法调用会报错。

    {Traceback (most recent call last):

      File "", line 1, in

      File "/home/ge/.local/lib/python2.7/site-packages/tensorflow/__init__.py", line 24, in

        from tensorflow.python import *

      File "/home/ge/.local/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 49, in

        from tensorflow.python import pywrap_tensorflow

      File "/home/ge/.local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 52, in

        raise ImportError(msg)

    ImportError: Traceback (most recent call last):

      File "/home/ge/.local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in

        from tensorflow.python.pywrap_tensorflow_internal import *

      File "/home/ge/.local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in

        _pywrap_tensorflow_internal = swig_import_helper()

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

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

    ImportError: libcusolver.so.8.0: cannot open shared object file: No such file or directory

    Failed to load the native TensorFlow runtime.

    See https://www.tensorflow.org/install/install_sources#common_installation_problems

    for some common reasons and solutions.  Include the entire stack trace

    above this error message when asking for help}

    3、关于pip install -i:

        pip install tensorflow -i https://mirrors.tuna.tsinghua.edu.cn/tensorflow/linux/cpu/tensorflow-1.3.0rc0-cp27-none-linux_x86_64.whl

    pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/   https://mirrors.tuna.tsinghua.edu.cn/tensorflow/linux/cpu/tensorflow-1.3.0rc0-cp27-none-linux_x86_64.whl

    这两个是不一样的的一个就会报错,第二才是从指定地方安装包的方法。

    (刚开始,没看清课件,写错了,郁闷了老会。要认真啊!)

    相关文章

      网友评论

        本文标题:3.14

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