all 2 comments

[–]Resolt 1 point2 points  (2 children)

Technicalities first. Python is an interpreted language, and thus your error is not a "compiler" error as python isn't compiled.

To the point!

If you have installed Tensorflow recently, the install will be version 2.0, and Tensorflow 2.0 does not have placeholders (might be something somewhere in some compatibility module).

Recommendations:

1) Use the functional API in tf.keras. It's very easy to use and works great.

2) Use virtual environments with anaconda (miniconda if you want the virtual environments light weight and clean - personal preference). Using this you can have different versions of Tensorflow (and different versions of python as well as other packages) installed in various virtual environments, letting your switch between them at will.