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)

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

4 Comments

there are two leading and trailing underscores. If you still get any error please post it too.
AttributeError: module 'tensorflow' has no attribute 'version'
version is not the attribute, please include underscores too

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.