Import Tkinter on 64-bit version : problem with libtk

Questions about BrainVisa usage and installation

Moderators: denghien, riviere

Post Reply
User avatar
Melanie PELEGRINI
Posts: 39
Joined: Tue Mar 23, 2004 4:20 pm
Location: U678 Inserm, Paris

Import Tkinter on 64-bit version : problem with libtk

Post by Melanie PELEGRINI »

Hi all,

I've installed a 32-bit Brainvisa 4.2.1 binary package and also a 64-bit Brainvisa 4.2.1 binary package. I'm running on a 64-bit CentOS 5.8 machine.

I have a library problem when using the python from the 64-bit package.

[root@...]# /PathTo/brainvisa42_x64/bin/python
Python 2.5.1 (r251:54863, Feb 18 2009, 18:24:17)
[GCC 4.2.2 20071128 (prerelease) (4.2.2-3.1mdv2008.0)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from Tkinter import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/PathTo/brainvisa42_x64/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: libtk8.5.so.0: cannot open shared object file: No such file or directory


while everything is fine when using the 32-bit version :

[root@...]# /PathTo/brainvisa42/bin/python
Python 2.5.1 (r251:54863, Oct 1 2008, 11:53:20)
[GCC 4.0.2 20051125 (Red Hat 4.0.2-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from Tkinter import *
>>>

The thing is, libtkXX.so.0 is not packaged with BrainVISA, so it looks for the CentOS system library, which is libtk8.4.so.0. It is OK for the 32-bit package, but the 64-bit package has apparently been linked with libtk8.5.so.0...
Maybe it would be a good idea in the future to put libtk in the package libs ?
Dominique Geffroy
Site Admin
Posts: 161
Joined: Thu Mar 01, 2007 4:22 pm
Location: IFR 49 - Neurospin, Gif-sur-Yvette, France
Contact:

Re: Import Tkinter on 64-bit version : problem with libtk

Post by Dominique Geffroy »

Hi,

I suppose we did not package the libtk because we don't use it in Brainvisa. What is your use case that requires the python of Brainvisa package and the libtk ?

Dominique
Post Reply