googlecodelabs / tensorflow-for-poets-2

Apache License 2.0
509 stars 463 forks source link

ERROR : python -m scripts.retrain -h #117

Open pumpkinband opened 5 years ago

pumpkinband commented 5 years ago

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)

  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals

  File "/home/samir/tensorflow-for-poets-2/scripts/retrain.py", line 109, in <module>
    import tensorflow as tf

  File "/home/samir/.local/lib/python2.7/site-packages/tensorflow/__init__.py", line 24, in <module>
    from tensorflow.python import *  # pylint: disable=redefined-builtin

  File "/home/samir/.local/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 63, in <module>
    from tensorflow.python.framework.framework_lib import *  # pylint: disable=redefined-builtin

  File "/home/samir/.local/lib/python2.7/site-packages/tensorflow/python/framework/framework_lib.py", line 102, in <module>
    from tensorflow.python.framework.importer import import_graph_def

  File "/home/samir/.local/lib/python2.7/site-packages/tensorflow/python/framework/importer.py", line 32, in <module>
    from tensorflow.python.framework import function

  File "/home/samir/.local/lib/python2.7/site-packages/tensorflow/python/framework/function.py", line 37, in <module>
    from tensorflow.python.ops import resource_variable_ops

  File "/home/samir/.local/lib/python2.7/site-packages/tensorflow/python/ops/resource_variable_ops.py", line 35, in <module>
    from tensorflow.python.ops import variables

  File "/home/samir/.local/lib/python2.7/site-packages/tensorflow/python/ops/variables.py", line 40, in    <module>
    class Variable(checkpointable.CheckpointableBase):
AttributeError: 'module' object has no attribute 'CheckpointableBase'
iDuckDark commented 5 years ago

u need to use python3, are you using a mac? use python3 instead of python in ur command line

Starscream9559 commented 5 years ago

I think is because he installed TF on Python3 but run in with python2. VirtualEnv related?

cshendye commented 4 years ago

I am having a similar issue