Python错误: NameError

错误

img_path = raw_input('Input the path and image name:')

执行显示如下:

NameError: name ‘raw_input’ is not defined

原因
raw_input是2.x版本的输入函数,在3.x版本下会报错,应该用input()

猜你喜欢

转载自blog.csdn.net/apr15/article/details/106505335