Thanks very much for the reply. It was very much appreciated but I am still failing to understand my stupidity.
I ran ls -l /usr/bin/python*
Code:
lrwxrwxrwx 1 root root 9 Jul 10 07:39 /usr/bin/python -> python2.7
lrwxrwxrwx 1 root root 9 Jul 10 07:39 /usr/bin/python2 -> python2.7
-rwxr-xr-x 1 root root 2989480 Aug 1 15:40 /usr/bin/python2.7
-rwxr-xr-x 1 root root 1652 Aug 1 15:40 /usr/bin/python2.7-config
-rwxr-xr-x 1 root root 6317954 Aug 1 14:55 /usr/bin/python2.7-dbg
-rwxr-xr-x 1 root root 1656 Aug 1 15:40 /usr/bin/python2.7-dbg-config
lrwxrwxrwx 1 root root 16 Apr 18 03:20 /usr/bin/python2-config -> python2.7-config
lrwxrwxrwx 1 root root 13 Apr 18 03:20 /usr/bin/python2-dbg -> python2.7-dbg
lrwxrwxrwx 1 root root 20 Apr 18 03:20 /usr/bin/python2-dbg-config -> python2.7-dbg-config
lrwxrwxrwx 1 root root 16 Apr 18 03:20 /usr/bin/python-config -> python2.7-config
lrwxrwxrwx 1 root root 13 Apr 18 03:20 /usr/bin/python-dbg -> python2.7-dbg
lrwxrwxrwx 1 root root 20 Apr 18 03:20 /usr/bin/python-dbg-config -> python2.7-dbg-config
so far so good and then modified hello.py to hello1.py
Code:
#!/usr/bin/python2.7
# This is the shebang line
# File: hello1.py
from Tkinter import *
root = Tk()
w = Label(root, text="Hello, world!")
w.pack()
root.mainloop()
So far so good but then when I ran it
Code:
lpa@CLINO:~/SWORK/Src/Python/Tkinter$ python hello1.py
Traceback (most recent call last):
File "hello1.py", line 5, in <module>
from Tkinter import *
File "/usr/local/lib/python2.5/lib-tk/Tkinter.py", line 38, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter
lpa@CLINO:~/SWORK/Src/Python/Tkinter$
Bookmarks