floydhub / floyd-docs

FloydHub's documentation code. Contributions welcome!
https://docs.floydhub.com/
63 stars 65 forks source link

Problems with importing tensorflow #36

Closed iontom closed 7 years ago

iontom commented 7 years ago

ImportError Traceback (most recent call last)

in () ----> 1 import tensorflow as tf 2 3 # Import MNIST data 4 from tensorflow.examples.tutorials.mnist import input_data 5 mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) ImportError: No module named 'tensorflow' The server I'm starting the job from is just a regular Ubuntu 16 Linode VPS without a GPU. I was actually having python environment problems getting Tensorflow to run locally which is how I found FloydHub. Is the Jupyter system using a Python Environment on the Floyd service or locally?
houqp commented 7 years ago

Do you also happened to have a file named "tensorflow.py" in your source code directory? Are you running it in a python2 environment? If so, try add from __future__ import absolute_import at the beginning of your code.

iontom commented 7 years ago

Okay - your instructions don't match your repo. This works just fine.

floyd run --mode jupyter --gpu --env tensorflow

houqp commented 7 years ago

could you tell us what instruction were you referring to?

iontom commented 7 years ago

http://docs.floydhub.com/getstarted/quick_start_jupyter/

iontom commented 7 years ago

They're specifying pytorch env, not tensorflow

houqp commented 7 years ago

The jupyter tutorial runs a pytorch project which should use pytorch environment instead. Perhaps you cloned the wrong source code for that project?

iontom commented 7 years ago

Ah, you're right. I was using same repo as the first tutorial. Well that was null issue. I thought pytorch had tensorflow implicitly or something, but I was just being dumb. Thanks for the quick response!

houqp commented 7 years ago

you are welcome :)