Unter Verwendung von Python und Tkinter, um eine einfache GUI zu erstellen, erhalte ich einen nicht erkannten Selektor, der an instance @ gesendet wir

Ich versuche zu lernen, wie man ein GUI-Programm mit Python erstellt. Ich benutze Python 2.7.6. Hier ist der Code für ein einfaches Fenster mit einer Beschriftung:

from Tkinter import *
root = Tk()
label = Label(root, text="hello")
label.pack()

root.mainloop()

Dieser Code funktioniert auf meinem Windows 7-Computer, jedoch nicht auf meinem Mac OSX 10.10.4. Auf dem Mac erhalte ich folgende Fehlermeldung:

    2015-08-18 10:32:09.137 Python[11678:5520486] -[QNSApplication_setup:]: unrecognized selector sent to instance 0x10f83bd10
    2015-08-18 10:32:09.137 Python[11678:5520486] -[QNSApplication _setup:]: unrecognized selector sent to instance 0x10f83bd10
     2015-08-18 10:32:09.139 Python[11678:5520486] (
0   CoreFoundation                      0x00007fff8ccc303c __exceptionPreprocess + 172
1   libobjc.A.dylib                     0x00007fff8ee8a76e objc_exception_throw + 43
2   CoreFoundation                      0x00007fff8ccc60ad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3   CoreFoundation                      0x00007fff8cc0be24 ___forwarding___ + 1028
4   CoreFoundation                      0x00007fff8cc0b998 _CF_forwarding_prep_0 + 120
5   Tk                                  0x00000001199b1527 TkpInit + 476
6   Tk                                  0x000000011992baca Tk_Init + 1788
7   _tkinter.so                         0x0000000110b01ceb Tcl_AppInit + 75
8   _tkinter.so                         0x0000000110afef14 Tkinter_Create + 916
9   Python                              0x00000001000c6ced PyEval_EvalFrameEx + 25213
10  Python                              0x00000001000c8fb9 PyEval_EvalCodeEx + 2137
11  Python                              0x00000001000419e0 function_call + 176
12  Python                              0x000000010000fe02 PyObject_Call + 98
13  Python                              0x000000010002251b instancemethod_call + 363
14  Python                              0x000000010000fe02 PyObject_Call + 98
15  Python                              0x00000001000bf7b7 PyEval_CallObjectWithKeywords + 87
16  Python                              0x000000010002580e PyInstance_New + 126
17  Python                              0x000000010000fe02 PyObject_Call + 98
18  Python                              0x00000001000c4138 PyEval_EvalFrameEx + 14024
19  Python                              0x00000001000c8fb9 PyEval_EvalCodeEx + 2137
20  Python                              0x00000001000c90d6 PyEval_EvalCode + 54
21  Python                              0x00000001000edc2e PyRun_FileExFlags + 174
22  Python                              0x00000001000bdb6c builtin_execfile + 364
23  Python                              0x00000001000c7132 PyEval_EvalFrameEx + 26306
24  Python                              0x00000001000c8fb9 PyEval_EvalCodeEx + 2137
25  Python                              0x00000001000419e0 function_call + 176
26  Python                              0x000000010000fe02 PyObject_Call + 98
27  Python                              0x00000001000c1d2d PyEval_EvalFrameEx + 4797
28  Python                              0x00000001000c8fb9 PyEval_EvalCodeEx + 2137
29  Python                              0x00000001000419e0 function_call + 176
30  Python                              0x000000010000fe02 PyObject_Call + 98
31  Python                              0x00000001000c1d2d PyEval_EvalFrameEx + 4797
32  Python                              0x00000001000c8fb9 PyEval_EvalCodeEx + 2137
33  Python                              0x00000001000c68ad PyEval_EvalFrameEx + 24125
34  Python                              0x00000001000c8fb9 PyEval_EvalCodeEx + 2137
35  Python                              0x00000001000c68ad PyEval_EvalFrameEx + 24125
36  Python                              0x00000001000c8fb9 PyEval_EvalCodeEx + 2137
37  Python                              0x00000001000419e0 function_call + 176
38  Python                              0x000000010000fe02 PyObject_Call + 98
39  Python                              0x00000001000c1d2d PyEval_EvalFrameEx + 4797
40  Python                              0x00000001000c8fb9 PyEval_EvalCodeEx + 2137
41  Python                              0x00000001000c68ad PyEval_EvalFrameEx + 24125
42  Python                              0x00000001000c8fb9 PyEval_EvalCodeEx + 2137
43  Python                              0x00000001000419e0 function_call + 176
44  Python                              0x000000010000fe02 PyObject_Call + 98
45  Python                              0x00000001000c1d2d PyEval_EvalFrameEx + 4797
46  Python                              0x00000001000c8fb9 PyEval_EvalCodeEx + 2137
47  Python                              0x00000001000c68ad PyEval_EvalFrameEx + 24125
48  Python                              0x00000001000c8fb9 PyEval_EvalCodeEx + 2137
49  Python                              0x00000001000c68ad PyEval_EvalFrameEx + 24125
50  Python                              0x00000001000c8fb9 PyEval_EvalCodeEx + 2137
51  Python                              0x00000001000c85df PyEval_EvalFrameEx + 31599
52  Python                              0x00000001000c8fb9 PyEval_EvalCodeEx + 2137
53  Python                              0x00000001000c68ad PyEval_EvalFrameEx + 24125
54  Python                              0x00000001000c8fb9 PyEval_EvalCodeEx + 2137
55  Python                              0x00000001000c68ad PyEval_EvalFrameEx + 24125
56  Python                              0x00000001000c8fb9 PyEval_EvalCodeEx + 2137
57  Python                              0x00000001000c68ad PyEval_EvalFrameEx + 24125
58  Python                              0x00000001000c8fb9 PyEval_EvalCodeEx + 2137
59  Python                              0x00000001000c68ad PyEval_EvalFrameEx + 24125
60  Python                              0x00000001000c8fb9 PyEval_EvalCodeEx + 2137
61  Python                              0x00000001000c68ad PyEval_EvalFrameEx + 24125
62  Python                              0x00000001000c8fb9 PyEval_EvalCodeEx + 2137
63  Python                              0x00000001000419e0 function_call + 176
64  Python                              0x000000010000fe02 PyObject_Call + 98
65  Python                              0x00000001000c1d2d PyEval_EvalFrameEx + 4797
66  Python                              0x00000001000c8fb9 PyEval_EvalCodeEx + 2137
67  Python                              0x00000001000419e0 function_call + 176
68  Python                              0x000000010000fe02 PyObject_Call + 98
69  Python                              0x00000001000c1d2d PyEval_EvalFrameEx + 4797
70  Python                              0x00000001000c8fb9 PyEval_EvalCodeEx + 2137
71  Python                              0x00000001000c68ad PyEval_EvalFrameEx + 24125
72  Python                              0x00000001000c8fb9 PyEval_EvalCodeEx + 2137
73  Python                              0x00000001000c68ad PyEval_EvalFrameEx + 24125
74  Python                              0x00000001000c8fb9 PyEval_EvalCodeEx + 2137
75  Python                              0x00000001000c68ad PyEval_EvalFrameEx + 24125
76  Python                              0x00000001000c8fb9 PyEval_EvalCodeEx + 2137
77  Python                              0x00000001000c68ad PyEval_EvalFrameEx + 24125
78  Python                              0x00000001000c8fb9 PyEval_EvalCodeEx + 2137
79  Python                              0x00000001000419e0 function_call + 176
80  Python                              0x000000010000fe02 PyObject_Call + 98
81  Python                              0x00000001000bf7b7 PyEval_CallObjectWithKeywords + 87
82  libpyside-python2.7.1.2.2.dylib     0x0000000102c67faa _ZN6PySide13SignalManager20callPythonMetaMethodERK11QMetaMethodPPvP7_objectb + 122
  )

ede Hilfe zum Verständnis, warum es auf einem Windows-Computer funktioniert, aber nicht auf einem Mac, wird geschätz

Vielen Dan

Antworten auf die Frage(2)

Ihre Antwort auf die Frage