How to Solve NameError: name 'pyocr' is not defined

Solution: Import the 'pyocr' module

# Add the following line to the top of your code
import pyocr

 

For more information:
Python pyocr