Solving the problem of NameError: name ‘reload’ is not defined

Today’s unhappiness is that reload (sys) can’t be used
prompt NameError: name ‘reload’ is not defined

import sys
reload(sys)
sys.setdefaultencoding("utf-8")

This one instead

import importlib
importlib.reload(sys)

Read More: