TKinter (filedialog.askdirectory) freezing Spyder console
try running this command %gui tk at the console before running your code.
The alternative is it go to Tools > Preferences > IPython Console > Graphics > Graphics backend
and select tkinter
there.
This worked for me :)The answer was found here https://groups.google.com/forum/#!topic/spyderlib/rFJhJZgjZTE