468,765 Members | 1,067 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

How, python with Tk extensions enabled to import Tkinter



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 to compile a software (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 information 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

Feb 27 '08 #1
0 1131

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Alexandre Gillet | last post: by
4 posts views Thread by Logan | last post: by
14 posts views Thread by Jeffrey Barish | last post: by
5 posts views Thread by Martyn Quick | last post: by
1 post views Thread by John Chambers | last post: by
27 posts views Thread by bcwhite | last post: by
3 posts views Thread by C Martin | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.