lhelontra / tensorflow-on-arm

TensorFlow for Arm
MIT License
1.05k stars 274 forks source link

ImportError: cannot import name 'cloud' #52

Closed Lmy0217 closed 4 years ago

Lmy0217 commented 5 years ago

I installed tensorflow-1.12.0-cp35-none-linux_aarch64.whl. When I run mnist code, I got an error about import package as follows:

Traceback (most recent call last):
  File "mnist.py", line 1, in <module>
    from tensorflow.examples.tutorials.mnist import input_data
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/examples/tutorials/mnist/__init__.py", line 21, in <module>
    from tensorflow.examples.tutorials.mnist import input_data
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/examples/tutorials/mnist/input_data.py", line 30, in <module>
    from tensorflow.contrib.learn.python.learn.datasets.mnist import read_data_sets
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/contrib/__init__.py", line 38, in <module>
    from tensorflow.contrib import cloud
ImportError: cannot import name 'cloud'

I checked /usr/local/lib/python3.5/dist-packages/tensorflow/contrib/ and there is not cloud folder. Is there something missing?

jw-redpanda commented 5 years ago

Same here .... when try running some samples, it fires error "ImportError: cannot import name 'cloud'" Using wheel tensorflow armv7l python35 on Raspberry Pi / Ubuntu 16.04 + virtualenvs.

Any workarounds to avoid this error?

miguelcpsbrito commented 5 years ago

Same here... running samples... Using wheel tensorflow armv7l python35 on Raspberry Pi / Raspbian Linux 9 (stretch)

lhelontra commented 5 years ago

thats is a issue of tensorflow project https://github.com/tensorflow/tensorflow/issues/23976 I tried comments the line from tensorflow.contrib import cloud but happened another errors.

Lmy0217 commented 5 years ago

@jw-redpanda @miguelcpsbrito @lhelontra Now I think this may not be a package problem. Contrib of TensorFlow is inherently unstable. Contrib should be avoided as much as possible and the code still works properly.

VincentChong123 commented 5 years ago

@Lmy0217

tensorflow-1.12.0-cp35-none-linux_aarch64.whl ImportError: cannot import name 'cloud' Now I think this may not be a package problem.

Would you please comment on such problem for tensorflow-1.13.1-cp35-none-linux_aarch64.whl ? Thanks. #25168 #67

VincentChong123 commented 5 years ago

Hi @Lmy0217, @lhelontra

Would you please comment on such problem for tensorflow-1.13.1-cp35-none-linux_aarch64.whl

My solution

/usb/venv/tf1.13/lib/python3.5/site-packages/tensorflow/contrib/__init__.py
#if os.name != "nt":
#from tensorflow.contrib import cloud