lanjl 发表于 2022-8-20 17:05:53

python3.10版本无法运行 colorchooser,

File "G:/8.20第七课.py", line 7, in callback
    fileName = colorchooser.askcolor()
NameError: name 'colorchooser' is not defined


File "G:/8.20第七课.py", line 6, in callback
    fileName = filedialog.askopenfilename()
NameError: name File "G:/8.20第七课.py", line 6, in callback
    fileName = filedialog.askopenfilename()
NameError: name 'filedialog' is not defined is not defined


Brick_Porter 发表于 2022-8-21 14:24:53

# 开头添加这行代码
from tkinter import filedialog, colorchooser
不添加的话用不了
页: [1]
查看完整版本: python3.10版本无法运行 colorchooser,