G
gaool
Hello,
I try to launch a Python script on SunOS system but I have this error:
"""Traceback (most recent call last):
File "ihm1_1.py", line 3, in ?
from Tkinter import *
File "/opt/sfw/lib/python2.3/lib-tk/Tkinter.py", line 38, in ?
import _tkinter # If this fails your Python may not be
configured for Tk
ImportError: ld.so.1: python: fatal: relocation error: file
/usr/local/lib/libtk8.4.so: symbol __eprintf: referenced
symbol not found"""
At the beginning, some people told me that it was due to a
different GCC version used for Python compilation and Tcl/Tk
compilation (because of "__eprintf" error).
=>But the GGC version was the same for the Python and Tcl/Tk
compilation on my system: GCC 3.3.2.
Then, I tried to find a solution and this is what i've found
on the Python web site:
"""
Step 1 - can _tkinter be imported?
Try the following command at the Python prompt: * If it works, skip to the next step.
* If it fails with "No module named _tkinter", your Python
configuration needs to be modified to include this module
(which is an extension module implemented in C). Edit
Modules/Setup (read the instructions at the top, search for
_tkinter, read more instructions there, and follow the
instructions) and rebuild and reinstall. Make sure to
enable the _tkinter module as well as the TKPATH variable
definition.
* If it fails with an error from the dynamic linker, see
above (for Unix, check for a header/library file mismatch;
for Windows, check that the TCL/TK DLLs can be found)."""
But I don't understand what "Edit Modules/Setup" means? Where is it ?
What is TKPATH? How can I modify it?
Do you think my problem comes from that "Edit Modules/Setup" ? Or do you think that there is something else wrong ?
thanks.
I try to launch a Python script on SunOS system but I have this error:
"""Traceback (most recent call last):
File "ihm1_1.py", line 3, in ?
from Tkinter import *
File "/opt/sfw/lib/python2.3/lib-tk/Tkinter.py", line 38, in ?
import _tkinter # If this fails your Python may not be
configured for Tk
ImportError: ld.so.1: python: fatal: relocation error: file
/usr/local/lib/libtk8.4.so: symbol __eprintf: referenced
symbol not found"""
At the beginning, some people told me that it was due to a
different GCC version used for Python compilation and Tcl/Tk
compilation (because of "__eprintf" error).
=>But the GGC version was the same for the Python and Tcl/Tk
compilation on my system: GCC 3.3.2.
Then, I tried to find a solution and this is what i've found
on the Python web site:
"""
Step 1 - can _tkinter be imported?
Try the following command at the Python prompt: * If it works, skip to the next step.
* If it fails with "No module named _tkinter", your Python
configuration needs to be modified to include this module
(which is an extension module implemented in C). Edit
Modules/Setup (read the instructions at the top, search for
_tkinter, read more instructions there, and follow the
instructions) and rebuild and reinstall. Make sure to
enable the _tkinter module as well as the TKPATH variable
definition.
* If it fails with an error from the dynamic linker, see
above (for Unix, check for a header/library file mismatch;
for Windows, check that the TCL/TK DLLs can be found)."""
But I don't understand what "Edit Modules/Setup" means? Where is it ?
What is TKPATH? How can I modify it?
Do you think my problem comes from that "Edit Modules/Setup" ? Or do you think that there is something else wrong ?
thanks.