Tkinter module not found
Shuaib
aries.shuaib at gmail.com
Tue Aug 8 12:00:42 EDT 2006
Hey again,
I am using the latest python available on my system (2.4). So I don't
think that's the problem.
Any more ideas? Do I need to install Tkinter as a seperate
module/package? As I said, I've already installed Tcl/Tk, though.
Thanks for your time.
Tim Chase wrote:
> > The cause of this is usually that you are using a different
> > version of Python than the one you installed Tkinter into, but
> > being a Linux newbie I have yet to discover how to redirect
> > the 'python' command to invoke the newer version of Python.
>
>
> The OS looks for the first 'python' it finds in its path.
>
> In Linux (or other *nix OSes), you can use
>
> bash> which python
>
> and it will reply with which python it's pointing to. You can
> then change into that directory (usually "/usr/bin") and get back
> a listing of various pythons. On my Debian linux distro at home,
> I get something back that looks like
>
> bash> which python
> /usr/bin/python
> bash> cd /usr/bin
> bash> ls -lsF python* | grep -o "python.*"
> python -> python2.3*
> python2.3*
> python2.4*
>
> You *should* be able to just relink the "python" link to the new
> version of python:
>
> bash> ln -sf /usr/bin/python2.4 /usr/bin/python
>
> I don't know if this will cause other problems down the line for
> packages that expect the system default.
>
> Alternatively, at least on my system, you can force your choice
> by explicity running "python2.3" or "python2.4" instead of just
> "python".
>
> You can determine your path via
>
> bash> echo $PATH
>
> along which your shell will search for an executable.
>
> Win32 has a similar executable search path
>
> c:\> echo %PATH%
>
> but doesn't have something as handy as the "which" command to do
> the hunting for you.
>
> HTH,
>
> -tkc
More information about the Python-list
mailing list