To install Python and TensorFlow, download Python version 3.5.2 from the Python website and TensorFlow from the TensorFlow website. Python 3.5.2 must be installed before installing TensorFlow. Once Python is installed, add it to the system PATH and install pip. Then use pip to install various Python packages like iPython, PyQt5, Matplotlib, OpenCV, and Spyder for data science and machine learning.