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

Discussion in 'Python' started by pythonusernw@gmail.com, Oct 15, 2012.

  1. Guest

    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
    , Oct 15, 2012
    #1
    1. Advertising

  2. Re: Can't run any script without it failing due to calling tkinterfor no reason

    On Sun, Oct 14, 2012 at 6:47 PM, <> wrote:
    > 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.
    Benjamin Kaplan, Oct 15, 2012
    #2
    1. Advertising

  3. Adam G Guest

    Re: Can't run any script without it failing due to calling tkinterfor no reason

    On Sunday, October 14, 2012 7:19:24 PM UTC-7, Benjamin Kaplan wrote:
    > On Sun, Oct 14, 2012 at 6:47 PM, <> wrote:
    >
    > > 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 simplenetwork scraping scripts. I use pydev and eclipse and must've fat fingeredsomething 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'vebuilt 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.




    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
    Adam G, Oct 15, 2012
    #3
  4. Adam G Guest

    Re: Can't run any script without it failing due to calling tkinterfor no reason

    On Sunday, October 14, 2012 7:19:24 PM UTC-7, Benjamin Kaplan wrote:
    > On Sun, Oct 14, 2012 at 6:47 PM, <> wrote:
    >
    > > 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 simplenetwork scraping scripts. I use pydev and eclipse and must've fat fingeredsomething 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'vebuilt 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.




    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
    Adam G, Oct 15, 2012
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Larry Brown

    ASP.NET version error without any reason

    Larry Brown, Nov 26, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    399
    Larry Brown
    Dec 2, 2004
  2. Tomasz
    Replies:
    0
    Views:
    442
    Tomasz
    Apr 23, 2005
  3. Fresh
    Replies:
    2
    Views:
    625
    Bo Persson
    Apr 22, 2008
  4. afrobeard
    Replies:
    2
    Views:
    293
    afrobeard
    May 28, 2008
  5. John Nagle
    Replies:
    43
    Views:
    1,084
    John Nagle
    Jul 7, 2009
Loading...

Share This Page