Training a Viola-Jones classifier from scratch can take a long time. Fortunately, a pre-trained Viola-Jones classifier comes out-of-the-box with OpenCV! You will use that one to see the algorithm in action. If you really want to train the classifier yourself, scikit-image offers a tutorial with the accompanying code on their website.
To follow the exercise in this lesson, you’re going to need to dowload the following image:

You’ll also need to go to the OpenCV GitHub repo.
rathodsushma5 on April 20, 2020
The code worked fine for me with python3.7. I didn’t had to downgrade to python2.7 as it was mentioned in the above comments.
OpenCV3 seemed to work fine, everything worked seemlessly for me.