1

I'm running the official TF docker repo using the Jupyter UI on localhost. It seems that TF is working in general, as I am able to import it, but when trying to import the distributions module I get an error:

print tf.__version__
import tf.distributions as dist

1.8.0

ImportErrorTraceback (most recent call last)
<ipython-input-3-4d440943cb46> in <module>()
      1 print tf.__version__
----> 2 import tf.distributions as dist

ImportError: No module named tf.distributions
Evan Zamir
  • 8,059
  • 14
  • 56
  • 83

1 Answers1

0

Try this

import tensorflow as tf
from tensorflow import distributions as dist

I don't think you can use import aliases for other import statements in python. I'm not too sure about this, but I think that's the problem.

FYI, I tested this on Python 3.5.2 and Tensorflow 1.8.0

squadrick
  • 770
  • 3
  • 21