Tensorflow:如何在不构建整个库的情况下测试开发代码?

时间:2017-11-02 11:50:52

标签: python tensorflow

所以我已经编辑了一些本地的tensorflow分支,现在我想测试一下。但是,当我尝试从python路径导入tensoflow时,我遇到错误:

追踪(最近一次呼叫最后一次):

  

文件   " /home/alex/work/python/tensorflow/tensorflow/python/platform/self_check.py" ;,   第25行,在       来自tensorflow.python.platform import build_info

     

ImportError:无法导入名称' build_info'

在处理上述异常期间,发生了另一个异常:

Traceback (most recent call last):   File "/home/alex/work/python/double_nf_vae/bin/run.py", line 1, in <module>
    import tensorflow as tf   File "/home/alex/work/python/tensorflow/tensorflow/__init__.py", line 24, in <module>
    from tensorflow.python import *   File "/home/alex/work/python/tensorflow/tensorflow/python/__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow   File "/home/alex/work/python/tensorflow/tensorflow/python/pywrap_tensorflow.py", line 25, in <module>
    from tensorflow.python.platform import self_check   File "/home/alex/work/python/tensorflow/tensorflow/python/platform/self_check.py", line 27, in <module>
    raise ImportError("Could not import tensorflow. Do not import tensorflow " ImportError: Could not import tensorflow. Do not import tensorflow from its source directory; change directory to outside the TensorFlow source tree, and relaunch your Python interpreter from there.

是否有任何解决方法?

0 个答案:

没有答案