[Compiler-sig] How, python with Tk extensions enabled to import Tkinter
Neal Norwitz
nnorwitz at gmail.com
Wed Feb 27 05:34:45 CET 2008
Merhaba Murat,
The best list to ask your question is python-list at python.org. That
list is the same as the comp.lang.python newsgroup.
Cheers,
n
On Tue, Feb 26, 2008 at 8:51 AM, Murat Gunduz <gunduz at ims.metu.edu.tr> wrote:
>
>
> Dear list member,
>
> I am using a Linux machine (Fedora Core 7, 64 bit):
> Linux 2.6.21-1.3228.fc7 #1 SMP Tue Jun 12 14:56:37 EDT 2007 x86_64
>
> I tried the compile the a softeare (ncvtk) with the simple command below
>
> % python setup.py install
>
> ERROR: could not import Tkinter.
> You need python with Tk extensions enabled.
> Check http://python.org.
> Tcl/Tk libraries can be found at http://tcl.sourceforge.net/.
>
>
> As the imformation said, I need a Python with Tk extensions enabled.
> However, I could not figure out how to compile python with Tk extension,
> I tried:
>
> 1- get the source codel tcl.8.5.1 and install
> 2- get the source code tk.8.5.1 and install
> 3- get the Python-2.5.2 source code and "cd Python-2.5.2"
> 4- type "./configure --enable-framework
> 5- make
>
> gives the below error
>
> ========================================
> gcc -pthread -c -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g
> -fwrapv
> -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -fPIC
> -DPy_BUILD_CORE
> -DPYTHONPATH='":plat-linux2:lib-tk"' \
> -DPREFIX='"/Library/Frameworks/Python.framework/Versions/2.5"'
> \
>
> -DEXEC_PREFIX='"/Library/Frameworks/Python.framework/Versions/2.5"' \
> -DVERSION='"2.5"' \
> -DVPATH='""' \
> -o Modules/getpath.o ./Modules/getpath.c
> ./Modules/getpath.c: In function ?calculate_path?:
> ./Modules/getpath.c:386: error: ?NSModule? undeclared (first use in this
> function)
> ./Modules/getpath.c:386: error: (Each undeclared identifier is reported only
> once
> ./Modules/getpath.c:386: error: for each function it appears in.)
> ./Modules/getpath.c:386: error: expected ?;? before ?pythonModule?
> ./Modules/getpath.c:455: error: ?pythonModule? undeclared (first use in this
> function)
> ./Modules/getpath.c:455: warning: implicit declaration of function
> ?NSModuleForSymbol?
> ./Modules/getpath.c:455: warning: implicit declaration of function
> ?NSLookupAndBindSymbol?
> ./Modules/getpath.c:457: warning: implicit declaration of function
> ?NSLibraryNameForModule?
> ./Modules/getpath.c:457: warning: cast to pointer from integer of different
> size
> make: *** [Modules/getpath.o] Error 1
> =========================================
>
>
> Could you please help, how should I configure Python to enable Tk extension.
>
> Thank you very much in advance,
> Murat
> _______________________________________________
> Compiler-sig mailing list
> Compiler-sig at python.org
> http://mail.python.org/mailman/listinfo/compiler-sig
>
More information about the Compiler-sig
mailing list