remove dependency for tk while using console mode

r? @Askeing