Pyacharm中项目运行前需要配置参数的配置流程
在一些项目运行之前需要先配置一些参数,如果不配置会报以下错误,error: the following arguments are required: -i/--image, -t/--template
一、配置流程如下所示:
# 设置参数
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", required=True,
help="path to input image")
ap.add_argument("-t", "--template", required=True,
help="path to template OCR-A image")
args = vars(ap.parse_args())