且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Tkinter 崩溃 Jupyter 内核?

更新时间: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","*.*"))