He pasado una noche muy frustrante tratando de obtener wxpython
para trabajar en mi MacBook Pro (ejecutando Snow Leopard 10.6.6). De la lectura de los diversos hilos sobre este tema, tanto aquí como en otros sitios web Este es mi entendimiento hasta el momento:Batallando con wxpython
- Si está ejecutando Python 2.6 o superior sólo se puede trabajar con wxpython si accede a la versión de 32 bits
- escribiendo
python
en el indicador de línea de comando revela que estoy usandopython 2.6.1
. - escribiendo
which python
devuelve/usr/bin/python
entonces estoy usando la versión predeterminada instalada con mi sistema operativo. Esto significa que escribiendo lo siguiente en el indicador de línea de comandodefaults write com.apple.versioner.python Prefer-32-Bit -bool yes
debería cambiar la versión que estoy usando a la versión de 32 bits. - Con lo anterior en su lugar, ahora puedo simplemente escribir el nombre de mi archivo python (con el módulo
wx
importado) y mi archivo se ejecutará correctamente.
Como sin duda puede adivinar, mi archivo no se ejecuta correctamente. No puedo entender lo que está pasando, pero tal vez alguien más aquí se están algunas otras observaciones que puedan ayudar ...
mecanografía help()
, modules
produce el siguiente mensaje y luego imprime los módulos, incluyendo wx
y wxpython
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/pkgutil.py:110: DeprecationWarning: The wxPython compatibility package is no longer automatically generated or actively maintained. Please switch to the wx package as soon as possible.
__import__(name)
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/pkgutil.py:110: DeprecationWarning: twisted.flow is unmaintained.
__import__(name)
/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/python/filepath.py:12: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
import sha
/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/words/im/__init__.py:8: UserWarning: twisted.im will be undergoing a rewrite at some point in the future. warnings.warn("twisted.im will be undergoing a rewrite at some point in the future.")
Fri Jun 3 22:23:48 Paul-Pattersons-MacBook-Pro.local python[3208] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
Luego de examinar el módulo wx
specifially yiel ds ...
NAME
wx
FILE
/usr/local/lib/wxPython-unicode-2.8.12.0/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/__init__.py
¿Alguien puede ayudar?
De acuerdo, ha publicado más en la lista de correo de wxpython. –