简体   繁体   中英

tensorflow on ubuntu 17.10 “artful” fails

tensorflow was working on version 1.6, although eager execution didn't work, then I un-installed tensorflow through pip uninstall tensorflow , then installed via pip install tensorflow , I got instruction error (core dumped) upon import tensorflow as tf .

note! I did upgrade Ubuntu from 17.xx to 17.10 artful between uninstalling and installing.

then I did pip uninstall tensorflow then, built tf from source code (discarded all suggested support instead jemalloc ), after which i got:

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                                                                                                                                               
>>>   

why module doesn't recognize platform module?

Your trying to load Tensorflow while your current working directory is where the sources are.

Just launch python outside this directory.

It is a known issue: https://github.com/tensorflow/tensorflow/issues/16264

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM