【发布时间】:2017-08-15 23:26:03
【问题描述】:
我开始在 Ubuntu Linux 16.06 LTS 上从源代码编译 TensorFlow,running the commands from the TensorFlow Linux compilation instructions。
我的 CUDA 和 CuDNN 设置工作正常,就像预编译的 TensorFlow nvidia-docker 映像一样工作。
使用 bazel 构建 TensorFlow Python 轮子,然后用 pip 安装轮子后,尝试导入 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
【问题讨论】:
标签: python tensorflow bazel