Tkinter crashes Jupyter kernel?

前端 未结 1 1367
花落未央
花落未央 2021-01-15 05:18

So I\'m starting out with tkinter (8.6.7) for the first time, installed via conda unto one of my environments with python 3.5.4 on it, and for some reasons it just keeps cra

相关标签:
1条回答
  • 2021-01-15 05:31

    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","*.*"))
    
    0 讨论(0)
提交回复
热议问题