Data Science Asked on May 31, 2021
I installed the packages for Tensorflow and Keras by using the Anaconda Packege installer (I have a separate environment for that). Unfortunately I can’t use Tensorflow or Keras. When I use the following code, I get an error message:
import tensorflow as tf
from tensorflow import keras
zip_path = tf.keras.utils.get_file(
origin='https://storage.googleapis.com/tensorflow/tf-keras-datasets/jena_climate_2009_2016.csv.zip',
fname='jena_climate_2009_2016.csv.zip',
extract=True)
csv_path, _ = os.path.splitext(zip_path)
–> Error message: AttributeError: module ‘tensorflow’ has no attribute ‘keras’
I tried to check the version of tensorflow by using the following code:
import tensorflow as tf
print(tf.__version__)
–> Error message: AttributeError: module ‘tensorflow’ has no attribute ‘version‘
I checked in the package manager of Anaconda and there the version of Tensorflow is 2.1.0 (see Screenshot)
From this website I can see that there is in fact a version 2.2 (https://docs.floydhub.com/guides/environments/)
However, I tried to update tensorflow (such that I can use it with keras) by using
Conda update tensorflow
But this did not change anything. I get the message: "# All requested packages already installed." and problem still persists and the version number remained unchanged. Also trying
Conda update keras
yields the same message "# All requested packages already installed."
What am I doing wrong? I’d appreciate every comment and would be quite thankful for your help.
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP