How to Solve NameError: name 'make_archive' is not defined -- shutil

Erorr: name 'make_archive' is not defined

NameError: name 'make_archive' is not defined

Solution: Import the 'make_archive' module

# Add the following line to the top of your code
from shutil import make_archive

 

For more information:
shutil make_archive