ubuntu 17.10“artful”上的tensorflow失败

2024-04-20 07:56:31 发布

您现在位置:Python中文网/ 问答频道 /正文

tensorflow在版本1.6上工作,虽然急切执行不起作用,但是我通过pip uninstall tensorflow卸载了tensorflow,然后通过pip install tensorflow安装,在import tensorflow as tf上我得到了指令错误(内核转储)。你知道吗

注意!我确实在卸载和安装之间将Ubuntu从17.xx升级到了17.10artful。你知道吗

然后我做了pip uninstall tensorflow,然后从源代码构建了tf(放弃了所有建议的支持,改为jemalloc),之后我得到:

root@commandor:/opt/tf/sc/tensorflow# python                                                                                                                                        
Python 2.7.14 (default, Sep 23 2017, 22:06:14)                                                                                                                                      
[GCC 7.2.0] on linux2                                                                                                                                                               
Type "help", "copyright", "credits" or "license" for more information.                                                                                                              
>>> 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 *  # pylint: disable=redefined-builtin                                                                                                            
  File "tensorflow/python/__init__.py", line 49, in <module>                                                                                                                        
    from tensorflow.python import pywrap_tensorflow                                                                                                                                 
  File "tensorflow/python/pywrap_tensorflow.py", line 25, in <module>                                                                                                               
    from tensorflow.python.platform import self_check                                                                                                                               
ImportError: No module named platform                                                                                                                                               
>>>   

为什么模块不能识别平台模块?你知道吗


Tags: 模块pipinfrompyimportinittf