1

Whenever using Tensorflow, I get this

WARNING:root:Keras version 2.1.5 detected. Last version known to be fully compatible of Keras is 2.1.3 .
WARNING:root:TensorFlow version 1.7.0 detected. Last version known to be fully compatible is 1.5.0 .

I think the first came from tensorflow to mean Keras is too new for tensorflow, but what does the second one mean, and how do I fix it? What is the risk in ignoring it?

Secondary questions:

  1. Additionally, what is the proper way to install things in python? I thought pip installing automatically grabbed versions that were compatible with one another as I've seen this happen before, downgrading and upgrading as necessary. Why don't tensorflow and Keras do it automatically too?

  2. If in your answer, if you could explain how you got there (like if there's way to debug and break on a regex match of .*Last version known.* for example).

1
  • what exact code are you running to produce these warnings?
    – Dr. Snoopy
    Sep 7, 2018 at 7:14

1 Answer 1

-1

Generally, this is just a warning. The TensorFlow engine is still a different project from Keras, and Keras will iteratively try to adapt to changes in TensorFlow. Thus, if you are using an older version of TensorFlow, you could run into problems where Keras is already looking for stuff that your current TensorFlow doesn't have yet.

Especially with these fast-paced update cycles common for Machine Learning Frameworks like TensorFlow, you don't need to update (although I would heavily recommend it.
Furthermore, you can create a stack of versions that fits to your specific needs.

As to the "how to install": Note that this is usually a biased answer, and depends on your personal preferences. I personally (!) prefer to use Anaconda Python, since it makes it very easy to integrate a nice stack for Data Science/Machine Learning.
Apart from that, if you are using pip (which is totally legitimate, too, and I occasionally use it as well), you can also specify versions.

What pip does, though (according to my knowledge), is only specify a specific minimal version. This means that you get some version after the minimal requirement. In your case, you (kind of) require a version range: "Not too old, but also not too new".

Since the latest version of TensorFlow is version 1.10, I would in this case still urge you to update the version, like so:

pip install tensorflow --upgrade
pip install keras --upgrade

To make sure that you have a nice compatibility. Additionally, I thought that Keras will also check for the version during installation, so look out for any flags during that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.