更新时间:2022-04-09 00:05:25
我复制了你的问题.如果对我来说,使用 %%python 魔法解决了.试试这个:
I replicated your problem. Using the %%python magic solved if for me. Try this:
%%python
from tkinter import filedialog
from tkinter import *
root = Tk()
root.filename = filedialog.askopenfilename(initialdir = "/",title = "Select
file",filetypes = (("jpeg files","*.jpg"),("all files","*.*"))