首页 新闻 会员 周边 捐助

在python中import TensorFlow报错

0
悬赏园豆:10 [已关闭问题] 关闭于 2018-06-02 21:36

本人菜鸟一枚,

要在服务器跑代码,想安装个TensorFlow,用pip install 成功了,可是import失败,百度Google不到原因,求助各位大神!

另,我是把package安装到我的目录文件夹下的,因为没有sudo权限。。。

 


>>> import tensorflow
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "tensorflow/python/__init__.py", line 52, in <module>
from tensorflow.core.framework.graph_pb2 import *
File "tensorflow/core/framework/graph_pb2.py", line 16, in <module>
from tensorflow.core.framework import node_def_pb2 as tensorflow_dot_core_dot_framework_dot_node__def__pb2
File "tensorflow/core/framework/node_def_pb2.py", line 16, in <module>
from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2
File "tensorflow/core/framework/attr_value_pb2.py", line 16, in <module>
from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2
File "tensorflow/core/framework/tensor_pb2.py", line 16, in <module>
from tensorflow.core.framework import resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resource__handle__pb2
File "tensorflow/core/framework/resource_handle_pb2.py", line 41, in <module>
options=None, file=DESCRIPTOR),
TypeError: __new__() got an unexpected keyword argument 'file'

小白努力码代码的主页 小白努力码代码 | 初学一级 | 园豆:155
提问于:2018-06-02 21:06
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册