Can't run any script without it failing due to calling tkinter for no reason

P

pythonusernw

Hello All,


I'm running python 3.2 on Freebsd 9.0 Release and I must've screwed up my environment somehow, because now I can't run any script without it failing and throwing:
** IDLE can't import Tkinter. Your Python may not be configured for Tk. **

Yet none of my scripts use tkinter nor call that module. They're simple network scraping scripts. I use pydev and eclipse and must've fat fingered something that screwed up my python environment, but I haven't the slightest clue on how to fix it. I can run my scripts in idle no problem, but I've built them as command line apps. I've tried uninstalling python 3 and reinstalling it to no avail. What did I do, and how can I fix it?

Thanks,
Adam
 
B

Benjamin Kaplan

Hello All,


I'm running python 3.2 on Freebsd 9.0 Release and I must've screwed up myenvironment somehow, because now I can't run any script without it failingand throwing:
** IDLE can't import Tkinter. Your Python may not be configured for Tk. **

Yet none of my scripts use tkinter nor call that module. They're simple network scraping scripts. I use pydev and eclipse and must've fat fingered something that screwed up my python environment, but I haven't the slightestclue on how to fix it. I can run my scripts in idle no problem, but I've built them as command line apps. I've tried uninstalling python 3 and reinstalling it to no avail. What did I do, and how can I fix it?

Thanks,
Adam
--

IDLE uses Tkinter. If you don't have Tk installed, just run the
scripts from the terminal or pick a different IDE.
 
A

Adam G

IDLE uses Tkinter. If you don't have Tk installed, just run the

scripts from the terminal or pick a different IDE.



Hi Ben,


Your reply instantly triggered my aha moment and I figured it out. I had animport to idlelib in one of my modules dependencies from an eclipse auto-import. I feel foolish for not seeing it sooner. I use eclipse and pydev anduse a module to do all the heavy network code for my front end command line scripts. In that module I used a function variable called host where eclipse, oh so helpfully, gave me the option of resolving an import I never asked for by automatically importing some module from idlelib. It was from idlelib import host as HOST or something to that effect. Damn eclipse does that to me from time to time and it happens so fast I don't even see what it does. Thanks for the reply and helping me see my erroneous ways.

Cheers,
Adam
 
A

Adam G

IDLE uses Tkinter. If you don't have Tk installed, just run the

scripts from the terminal or pick a different IDE.



Hi Ben,


Your reply instantly triggered my aha moment and I figured it out. I had animport to idlelib in one of my modules dependencies from an eclipse auto-import. I feel foolish for not seeing it sooner. I use eclipse and pydev anduse a module to do all the heavy network code for my front end command line scripts. In that module I used a function variable called host where eclipse, oh so helpfully, gave me the option of resolving an import I never asked for by automatically importing some module from idlelib. It was from idlelib import host as HOST or something to that effect. Damn eclipse does that to me from time to time and it happens so fast I don't even see what it does. Thanks for the reply and helping me see my erroneous ways.

Cheers,
Adam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top