Mail Archives: cygwin/2002/12/22/16:55:02
Tkinter of python-2.2.2-1 is unsable with the recent tcltk-20021218-1.
Python 2.2.2 (#1, Nov 15 2002, 07:49:04)
[GCC 2.95.3-5 (cygwin special)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Tkinter
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.2/lib-tk/Tkinter.py", line 35, in ?
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: dlopen: Win32 error 126
You cannot make the Tkinter usable again by just recompiling the Python.
The below is a quick hack for "python-2.2.2-1/setup.py" to fix it.
*** setup.py~ Thu Oct 10 00:59:16 2002
--- setup.py Fri Dec 20 05:02:20 2002
***************
*** 699,715 ****
tcl_includes = find_file('tcl.h', inc_dirs, debian_tcl_include)
tk_includes = find_file('tk.h', inc_dirs, debian_tk_include)
! if (tcllib is None or tklib is None and
! tcl_includes is None or tk_includes is None):
# Something's missing, so give up
! return
# OK... everything seems to be present for Tcl/Tk.
include_dirs = [] ; libs = [] ; defs = [] ; added_lib_dirs = []
! for dir in tcl_includes + tk_includes:
! if dir not in include_dirs:
! include_dirs.append(dir)
# Check for various platform-specific directories
platform = self.get_platform()
--- 699,715 ----
tcl_includes = find_file('tcl.h', inc_dirs, debian_tcl_include)
tk_includes = find_file('tk.h', inc_dirs, debian_tk_include)
! #if (tcllib is None or tklib is None and
! # tcl_includes is None or tk_includes is None):
# Something's missing, so give up
! # return
# OK... everything seems to be present for Tcl/Tk.
include_dirs = [] ; libs = [] ; defs = [] ; added_lib_dirs = []
! #for dir in tcl_includes + tk_includes:
! # if dir not in include_dirs:
! # include_dirs.append(dir)
# Check for various platform-specific directories
platform = self.get_platform()
***************
*** 728,738 ****
added_lib_dirs.append('/usr/X11/lib')
# If Cygwin, then verify that X is installed before proceeding
! if platform == 'cygwin':
! x11_inc = find_file('X11/Xlib.h', [], inc_dirs)
! if x11_inc is None:
# X header files missing, so give up
! return
# Check for BLT extension
if self.compiler.find_library_file(lib_dirs + added_lib_dirs,
--- 728,738 ----
added_lib_dirs.append('/usr/X11/lib')
# If Cygwin, then verify that X is installed before proceeding
! #if platform == 'cygwin':
! # x11_inc = find_file('X11/Xlib.h', [], inc_dirs)
! # if x11_inc is None:
# X header files missing, so give up
! # return
# Check for BLT extension
if self.compiler.find_library_file(lib_dirs + added_lib_dirs,
***************
*** 741,748 ****
libs.append('BLT8.0')
# Add the Tcl/Tk libraries
! libs.append('tk'+version)
! libs.append('tcl'+version)
if platform in ['aix3', 'aix4']:
libs.append('ld')
--- 741,750 ----
libs.append('BLT8.0')
# Add the Tcl/Tk libraries
! #libs.append('tk'+version)
! #libs.append('tcl'+version)
! libs.append("cygtk83")
! libs.append("cygtcl83")
if platform in ['aix3', 'aix4']:
libs.append('ld')
By recompiling the python-2.2.2 with this "setup.py", you will get
Tkinter-enabled python again; and besides you can use Input Method
on the Tkinter to input your native language (such as Japanese) now.
(It is the important advantage of using the recent Tcl/Tk, you know.)
-- SUZUKI Hisao
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -