TensorFlow 2.0
Could you adapt your code to the TensorFlow 2.0? I have some problems with it.
This book uses TensorFlow 1.0, as you may have already surmised. Since 1.0 and 2.0 are different major versions, it's expected that they are not backwards/forwards compatible.
TensorFlow's site has some tutorials which are very similar to exercises in this book, but it would require significant effort to refactor all the code in the book to 2.0.
Could you adapt your code to the TensorFlow 2.0? I have some problems with it.
Try importing Tensorflow with the following code and see if it works:
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
And then run your codes in the first edition of the book.
But eventually you will have to learn TensorFlow 2. If I am not mistaken Aurelien (the author) has recently published another edition of the book, and I think it uses TensorFlow 2 (it says on the cover "updated for TensorFlow 2").
You have it here https://github.com/ageron/handson-ml2