2017-08-15 108 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中。

相關問題