use try instead of if for tkinter import