2017-08-15 85 views
1

我开始在Ubuntu Linux 16.06 LTS,running the commands from the TensorFlow Linux compilation instructions上从源代码编译TensorFlow。从源代码安装后,TensorFlow无法加载运行时间

由于预编译的TensorFlow nvidia-docker映像可以工作,因此我的CUDA和CuDNN安装程序可以工作。

使用巴泽勒打造TensorFlow Python的车轮,然后安装带有画中画轮后,试图导入TensorFlow时,我得到了以下错误消息:

>>> import tensorflow 
Traceback (most recent call last): 
    File "/home/james/workspace/tensorflow/tensorflow/python/pywrap_tensorflow.py", line 41, in <module> 
    from tensorflow.python.pywrap_tensorflow_internal import * 
ImportError: No module named 'tensorflow.python.pywrap_tensorflow_internal' 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "/home/james/workspace/tensorflow/tensorflow/__init__.py", line 24, in <module> 
    from tensorflow.python import * 
    File "/home/james/workspace/tensorflow/tensorflow/python/__init__.py", line 49, in <module> 
    from tensorflow.python import pywrap_tensorflow 
    File "/home/james/workspace/tensorflow/tensorflow/python/pywrap_tensorflow.py", line 52, in <module> 
    raise ImportError(msg) 
ImportError: Traceback (most recent call last): 
    File "/home/james/workspace/tensorflow/tensorflow/python/pywrap_tensorflow.py", line 41, in <module> 
    from tensorflow.python.pywrap_tensorflow_internal import * 
ImportError: No module named 'tensorflow.python.pywrap_tensorflow_internal' 


Failed to load the native TensorFlow runtime. 

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

回答

2

,当你从运行的Python发生此错误TensorFlow源目录之后安装了Python滚轮。

A similar error happens当您在安装Python滚轮之前尝试导入TensorFlow时。

此问题的解决方案是将您的工作目录更改为其他内容,同时仍然保留在您安装Python轮子的virtualenv中。

相关问题