I'm using ubuntu11.10 and python2.7.2 .
A weird error:
File "/usr/local/lib/python2.7/lib-tk/Tkinter.py", line 39, in
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter
But Tk was already installed in my computer...
File "/usr/local/lib/python2.7/lib-tk/Tkinter.py", line 39, in
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter
But Tk was already installed in my computer...
$ sudo apt-get install python-tkReading package lists...Done
Building dependency tree Reading state information...Done
python-tk is already the newest version.
0 upgraded,0 newly installed,0 to remove and0not upgraded.
It may be the problem of having two different versions of python installed in the computer.
Solution:
sudo ln -f /usr/bin/python2.7 /usr/local/bin/python
No comments:
Post a Comment