0

Can someone please help, why am I getting this error AttributeError: module 'tensorflow' has no attribute 'version' ? ver installed TF2.0.0.rc0

from __future__ import absolute_import, division, print_function, unicode_literals

# TensorFlow and tf.keras
import tensorflow as tf
from tensorflow import keras

# Helper libraries
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

print(tf.version)
Mike
  • 21
  • 1
  • 4

1 Answers1

3

enter image description here

You need to modify your last statement as print(tf.__version__) instead of print(tf.version) as the attribute name is __version__ rather than version. There are two leading and trailing underscores.

Deven
  • 741
  • 1
  • 7
  • 21