How to Solve NameError: name 'argv' is not defined -- sys

Solution: Import the 'argv' module

To Solve the error, add the following line to the top of your code.

from sys import argv

 

For more information:
Python sys argv