How to Solve NameError: name 'ArgumentParser' is not defined -- argparse
Solution: Import the 'ArgumentParser' module
To Solve the error, add the following line to the top of your code.
from argparse import ArgumentParser
For more information:
Python ArgumentParser argparse