wxpython on Mac: "This program needs access to the screen"

Hey guys!

I'm on a Mac and I installed wx and wxpython by installing the
wxmac[1] homebrew[2] formular with the `--python` and the `--devel`
option to include (wx)python and 64bit support. My python[3] install
has also been done via homebrew.

Now if I try to run the getting started example[4] from the wxPyWiki,
I get this error:

   This program needs access to the screen
   Please run with a Framework build of python, and only when you are
logged in the main display of your Mac.

The way I try to run the program is by simply typing python wx.py in
my terminal.

What is the problem and how do I get it working?

[1]: https://github.com/mxcl/homebrew/blob/master/Library/Formula/wxmac.rb
[2]: http://mxcl.github.com/homebrew/
[3]: https://github.com/mxcl/homebrew/blob/master/Library/Formula/python.rb
[4]: http://wiki.wxpython.org/Getting%20Started#A_First_Application%3A_.22Hello.2C_World.22

// Chris Buchholz

Hi,

···

On Wed, Jun 13, 2012 at 2:56 AM, christoffer.buchholz@gmail.com <christoffer.buchholz@gmail.com> wrote:

Hey guys!

I'm on a Mac and I installed wx and wxpython by installing the
wxmac[1] homebrew[2] formular with the `--python` and the `--devel`
option to include (wx)python and 64bit support. My python[3] install
has also been done via homebrew.

Now if I try to run the getting started example[4] from the wxPyWiki,
I get this error:

This program needs access to the screen
Please run with a Framework build of python, and only when you are
logged in the main display of your Mac.

Which python are you running? (apple python, python from python.org, mac ports?)

Try running with 'pythonw'.

Cody

Looking at [3] it appears that the homebrew formula for Python has a --framework option. Use it.

···

On 6/13/12 12:56 AM, christoffer.buchholz@gmail.com wrote:

Hey guys!

I'm on a Mac and I installed wx and wxpython by installing the
wxmac[1] homebrew[2] formular with the `--python` and the `--devel`
option to include (wx)python and 64bit support. My python[3] install
has also been done via homebrew.

Now if I try to run the getting started example[4] from the wxPyWiki,
I get this error:

    This program needs access to the screen
    Please run with a Framework build of python, and only when you are
logged in the main display of your Mac.

The way I try to run the program is by simply typing python wx.py in
my terminal.

What is the problem and how do I get it working?

[1]: https://github.com/mxcl/homebrew/blob/master/Library/Formula/wxmac.rb
[2]: http://mxcl.github.com/homebrew/
[3]: https://github.com/mxcl/homebrew/blob/master/Library/Formula/python.rb
[4]: http://wiki.wxpython.org/Getting%20Started#A_First_Application%3A_.22Hello.2C_World.22

--
Robin Dunn
Software Craftsman