[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

How, python with Tk extensions enabled to import Tkinter

Murat Gunduz

2/27/2008 5:12:00 AM



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://....
Tcl/Tk libraries can be found at http://tcl.source....


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

3 Answers

Diez B. Roggisch

2/27/2008 9:42:00 AM

0

Murat Gunduz 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

So you are under linux...
> 4- type "./configure --enable-framework

And now you try to create an OSX-framework-build? Why so, what made you
think that's working?

The missing NS*-class-reference is a sign of the build-process being
confused, because NS* is the class-namespace of OSX for objective-C.

Try the configure without the --enable-framework.

Diez

AlleyCat

7/29/2014 2:57:00 AM

0


On Mon, 28 Jul 2014 22:48:06 -0400, Sid9 says...

> The twin towers had a central support and utility core.
> The floors were supported by the EXTERIOR framework.
>
> Any incident that would cause a higher floor to collapse
> on the floor below would cause the entire building
> collapse like a house of cards.
>
> The Empire State Building has steel supports through out to support the
> floors.
> A collapse like the WTC is impossible.

Thanks, I guess. Shouldn't you have put this in the thread under wy?

--

A "teabagger" is a male Democrat who performs fellatio on another male
Democrat... either sucking his balls or laying his genitals on his
partner's face. <snicker>

AlleyCat

7/29/2014 2:58:00 AM

0


Per Sid9:

The twin towers had a central support and utility core.
The floors were supported by the EXTERIOR framework.

Any incident that would cause a higher floor to collapse
on the floor below would cause the entire building
collapse like a house of cards.

The Empire State Building has steel supports through out to support the
floors.

A collapse like the WTC is impossible.

Boy, you're stupid.

--

A "teabagger" is a male Democrat who performs fellatio on another male
Democrat... either sucking his balls or laying his genitals on his
partner's face. <snicker>