1010Archive-name: python-faq/part1
1111Submitted-by: Guido van Rossum <
[email protected] >
1212Version: $Revision$
13- Last-modified: 11 September 1996
13+ Last-modified: $Date$
1414
1515This article contains answers to Frequently Asked Questions about
1616Python (an object-oriented interpreted programming language -- see
@@ -105,16 +105,17 @@ Here's an overview of the questions per chapter:
105105 3.9. Q. Trouble with prototypes on Ultrix.
106106 3.10. Q. Other trouble building Python on platform X.
107107 3.11. Q. How to configure dynamic loading on Linux.
108- 3.12. Q. Errors when linking with a shared library containing C++ code.
109- 3.13. Q. I built with tkintermodule.c enabled but get "Tkinter not found".
110- 3.14. Q. I built with Tk 4.0 but Tkinter complains about the Tk version.
111- 3.15. Q. Link errors for Tcl/Tk symbols when linking with Tcl/Tk.
112- 3.16. Q. I configured and built Python for Tcl/Tk but "import Tkinter"
108+ 3.12. Q: I can't get shared modules to work on Linux 2.0 (Slackware96)?
109+ 3.13. Q. Errors when linking with a shared library containing C++ code.
110+ 3.14. Q. I built with tkintermodule.c enabled but get "Tkinter not found".
111+ 3.15. Q. I built with Tk 4.0 but Tkinter complains about the Tk version.
112+ 3.16. Q. Link errors for Tcl/Tk symbols when linking with Tcl/Tk.
113+ 3.17. Q. I configured and built Python for Tcl/Tk but "import Tkinter"
113114 fails.
114- 3.17 . Q. Tk doesn't work right on DEC Alpha.
115- 3.18 . Q. Several common system calls are missing from the posix module.
116- 3.19 . Q. ImportError: No module named string, on MS Windows.
117- 3.20 . Q. Core dump on SGI when using the gl module.
115+ 3.18 . Q. Tk doesn't work right on DEC Alpha.
116+ 3.19 . Q. Several common system calls are missing from the posix module.
117+ 3.20 . Q. ImportError: No module named string, on MS Windows.
118+ 3.21 . Q. Core dump on SGI when using the gl module.
118119
119120 4. Programming in Python
120121 4.1. Q. Is there a source code level debugger with breakpoints, step,
@@ -776,21 +777,31 @@ it to me too.
776777A. This is now automatic as long as your Linux version uses the ELF
777778object format (all recent Linuxes do).
778779
779- 3.12. Q. Errors when linking with a shared library containing C++ code.
780+ 3.12. Q: I can't get shared modules to work on Linux 2.0 (Slackware96)?
781+
782+ A: This is a bug in the Slackware96 release. The fix is simple:
783+
784+ Make sure that there is a link from /lib/libdl.so to /lib/libdl.so.1
785+ so that the following links are setup:
786+
787+ /lib/libdl.so -> /lib/libdl.so.1
788+ /lib/libdl.so.1 -> /lib/libdl.so.1.7.14
789+
790+ 3.13. Q. Errors when linking with a shared library containing C++ code.
780791
781792A. Link the main Python binary with C++. Change the definition of
782793LINKCC in Modules/Makefile to be your C++ compiler. You may have to
783794edit config.c slightly to make it compilable with C++.
784795
785- 3.13 . Q. I built with tkintermodule.c enabled but get "Tkinter not found".
796+ 3.14 . Q. I built with tkintermodule.c enabled but get "Tkinter not found".
786797
787798A. Tkinter.py (note: upper case T) lives in a subdirectory of Lib,
788799Lib/tkinter. If you are using the default module search path, you
789800probably didn't enable the line in the Modules/Setup file defining
790801TKPATH; if you use the environment variable PYTHONPATH, you'll have to
791802add the proper tkinter subdirectory.
792803
793- 3.14 . Q. I built with Tk 4.0 but Tkinter complains about the Tk version.
804+ 3.15 . Q. I built with Tk 4.0 but Tkinter complains about the Tk version.
794805
795806A. Several things could cause this. You most likely have a Tk 3.6
796807installation that wasn't completely eradicated by the Tk 4.0
@@ -801,7 +812,7 @@ have compiled Python with the old tk.h header file (yes, this actually
801812compiles!); you may actually have linked with Tk 3.6 even though Tk
8028134.0 is also around. Similar for Tcl 7.4 vs. Tcl 7.3.
803814
804- 3.15 . Q. Link errors for Tcl/Tk symbols when linking with Tcl/Tk.
815+ 3.16 . Q. Link errors for Tcl/Tk symbols when linking with Tcl/Tk.
805816
806817Quite possibly, there's a version mismatch between the Tcl/Tk header
807818files (tcl.h and tk.h) and the tck/tk libraries you are using (the
@@ -812,13 +823,13 @@ Setup line for _tkinter in some Python distributions references
8128237.4/4.0 by default. Changing this to 7.5/4.1 should take care of
813824this.
814825
815- 3.16 . Q. I configured and built Python for Tcl/Tk but "import Tkinter"
826+ 3.17 . Q. I configured and built Python for Tcl/Tk but "import Tkinter"
816827fails.
817828
818829A. Most likely, you forgot to enable the line in Setup that says
819830"TKPATH=:$(DESTLIB)/tkinter".
820831
821- 3.17 . Q. Tk doesn't work right on DEC Alpha.
832+ 3.18 . Q. Tk doesn't work right on DEC Alpha.
822833
823834A. You probably compiled either Tcl, Tk or Python with gcc. Don't.
824835For this platform, which has 64-bit integers, gcc is known to generate
@@ -830,15 +841,15 @@ far as we know, there are no problem with gcc on other platforms --
830841the instabilities seem to be restricted to the DEC Alpha.) See also
831842question 3.6.
832843
833- 3.18 . Q. Several common system calls are missing from the posix module.
844+ 3.19 . Q. Several common system calls are missing from the posix module.
834845
835846A. Most likely, *all* test compilations run by the configure script
836847are failing for some reason or another. Have a look in config.log to
837848see what could be the reason. A common reason is specifying a
838849directory to the --with-readline option that doesn't contain the
839850libreadline.a file.
840851
841- 3.19 . Q. ImportError: No module named string, on MS Windows.
852+ 3.20 . Q. ImportError: No module named string, on MS Windows.
842853
843854A. Most likely, your PYTHONPATH environment variable should be set to
844855something like:
@@ -847,7 +858,7 @@ set PYTHONPATH=c:\python;c:\python\lib;c:\python\scripts
847858
848859(assuming Python was installed in c:\python)
849860
850- 3.20 . Q. Core dump on SGI when using the gl module.
861+ 3.21 . Q. Core dump on SGI when using the gl module.
851862
852863There are conflicts between entry points in the termcap and curses
853864libraries and an entry point in the GL library. There's a hack of a
0 commit comments