<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>How to configure the non-default Python version to work with tk </TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>
<P><FONT SIZE=2>Hi all,<BR>
<BR>
I have a very newby question.<BR>
I'm using a computer with Ubuntu Karmic Koala.<BR>
The Ubuntu has python 2.6 installed by default, and this default installation includes tkinter.<BR>
<BR>
However, I'm using a platform (NuPIC) that needs Python 2.5. This I had to install manually in /usr/local.<BR>
Unfortunately, the manually installed version that I need doesn't seem to be able to find the tkinter libraries.<BR>
<BR>
I have tried with "sudo apt-get install python2.5-tk" but it doesn't install it as it notices there is a newer version already.<BR>
<BR>
The error message that I get is:<BR>
<BR>
noses@PCF-191-0907l:~/NuPIC/current/share/projects/bitworm$ python DisplayReport.py<BR>
Traceback (most recent call last):<BR>
File "DisplayReport.py", line 18, in <module><BR>
from pylab import *<BR>
File "/home/noses/NuPIC/current/lib/python2.5/site-packages/pylab.py", line 1, in <module><BR>
from matplotlib.pylab import *<BR>
File "/home/noses/NuPIC/current/lib/python2.5/site-packages/matplotlib/pylab.py", line 253, in <module><BR>
from matplotlib.pyplot import *<BR>
File "/home/noses/NuPIC/current/lib/python2.5/site-packages/matplotlib/pyplot.py", line 75, in <module><BR>
new_figure_manager, draw_if_interactive, show = pylab_setup()<BR>
File "/home/noses/NuPIC/current/lib/python2.5/site-packages/matplotlib/backends/__init__.py", line 25, in pylab_setup<BR>
globals(),locals(),[backend_name])<BR>
File "/home/noses/NuPIC/current/lib/python2.5/site-packages/matplotlib/backends/backend_tkagg.py", line 7, in <module><BR>
import Tkinter as Tk, FileDialog<BR>
File "/usr/local/lib/python2.5/lib-tk/Tkinter.py", line 38, in <module><BR>
import _tkinter # If this fails your Python may not be configured for Tk<BR>
ImportError: No module named _tkinter<BR>
<BR>
<BR>
Any help figuring this out is very much appreciated!!<BR>
<BR>
Best regards,<BR>
Noelia<BR>
<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>