<!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 &quot;sudo apt-get install python2.5-tk&quot; 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>
&nbsp; File &quot;DisplayReport.py&quot;, line 18, in &lt;module&gt;<BR>
&nbsp;&nbsp;&nbsp; from pylab import *<BR>
&nbsp; File &quot;/home/noses/NuPIC/current/lib/python2.5/site-packages/pylab.py&quot;, line 1, in &lt;module&gt;<BR>
&nbsp;&nbsp;&nbsp; from matplotlib.pylab import *<BR>
&nbsp; File &quot;/home/noses/NuPIC/current/lib/python2.5/site-packages/matplotlib/pylab.py&quot;, line 253, in &lt;module&gt;<BR>
&nbsp;&nbsp;&nbsp; from matplotlib.pyplot import *<BR>
&nbsp; File &quot;/home/noses/NuPIC/current/lib/python2.5/site-packages/matplotlib/pyplot.py&quot;, line 75, in &lt;module&gt;<BR>
&nbsp;&nbsp;&nbsp; new_figure_manager, draw_if_interactive, show = pylab_setup()<BR>
&nbsp; File &quot;/home/noses/NuPIC/current/lib/python2.5/site-packages/matplotlib/backends/__init__.py&quot;, line 25, in pylab_setup<BR>
&nbsp;&nbsp;&nbsp; globals(),locals(),[backend_name])<BR>
&nbsp; File &quot;/home/noses/NuPIC/current/lib/python2.5/site-packages/matplotlib/backends/backend_tkagg.py&quot;, line 7, in &lt;module&gt;<BR>
&nbsp;&nbsp;&nbsp; import Tkinter as Tk, FileDialog<BR>
&nbsp; File &quot;/usr/local/lib/python2.5/lib-tk/Tkinter.py&quot;, line 38, in &lt;module&gt;<BR>
&nbsp;&nbsp;&nbsp; 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>