wxPython 4.0.4 not running on OSX, Python 3.7.2

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

wxPython 4.0.4 not running on OSX, Python 3.7.2

Ed Leafe-2
I recently installed wxPython 4.0.4 on my Mac running Python 3.7.2. When I run the following simple script:

import wx
wx.App()

I'm getting the "This program needs access to the screen" message. I remember from the Python 2 days that I needed to run 'pythonw' instead of 'python', but there doesn't seem to be an equivalent for Python 3. 

What am I missing?

--

 Ed Leafe

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: wxPython 4.0.4 not running on OSX, Python 3.7.2

Matt Newville
Yes, you need pythonw.  Which Python 3.7.2 are you using (Python org, MacPorts, Anaconda Python)? 

If using Anaconda Python, you'll need to do `conda install python.app`.

--Matt


On Thu, Jan 17, 2019 at 11:52 AM Ed Leafe <[hidden email]> wrote:
I recently installed wxPython 4.0.4 on my Mac running Python 3.7.2. When I run the following simple script:

import wx
wx.App()

I'm getting the "This program needs access to the screen" message. I remember from the Python 2 days that I needed to run 'pythonw' instead of 'python', but there doesn't seem to be an equivalent for Python 3. 

What am I missing?

--

 Ed Leafe

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: wxPython 4.0.4 not running on OSX, Python 3.7.2

Ed Leafe-2
I was using 3.6 installed from brew, but more recently installed 3.7.2 from python.org.

On Thu, Jan 17, 2019 at 12:30 PM Matt Newville <[hidden email]> wrote:
Yes, you need pythonw.  Which Python 3.7.2 are you using (Python org, MacPorts, Anaconda Python)? 

If using Anaconda Python, you'll need to do `conda install python.app`.

--Matt


On Thu, Jan 17, 2019 at 11:52 AM Ed Leafe <[hidden email]> wrote:
I recently installed wxPython 4.0.4 on my Mac running Python 3.7.2. When I run the following simple script:

import wx
wx.App()

I'm getting the "This program needs access to the screen" message. I remember from the Python 2 days that I needed to run 'pythonw' instead of 'python', but there doesn't seem to be an equivalent for Python 3. 

What am I missing?

--

 Ed Leafe

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.


--
Ed Leafe

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: wxPython 4.0.4 not running on OSX, Python 3.7.2

Robin Dunn
On Thursday, January 17, 2019 at 10:48:25 AM UTC-8, Ed Leafe wrote:
I was using 3.6 installed from brew, but more recently installed 3.7.2 from <a href="http://python.org" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fpython.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF558DEk4MojQmCDwPIrITw2rjEQA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fpython.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF558DEk4MojQmCDwPIrITw2rjEQA&#39;;return true;">python.org.


Are you sure the python being executed is the one from the new install? The stock Python works for me:

 >  python3.7 -m venv test-py372
 >  wrangler test-py372
Python Wrangler: 2.7
Writing new activate_this.py script.
Activating environment with:
/Users/robind/.myPyEnv/test-py372/bin/activate
(test-py372) >  which python
/Users/robind/.myPyEnv/test-py372/bin/python
(test-py372) >  which pip
/Users/robind/.myPyEnv/test-py372/bin/pip
(test-py372) >  pip install wxPython
Collecting wxPython
  Downloading https://files.pythonhosted.org/packages/8d/d3/c77c2d557b67372986988c5d33ae8f8e41400129c8f6e3f63368f7aecbd3/wxPython-4.0.4-cp37-cp37m-macosx_10_9_x86_64.whl (31.3MB)
    100% |████████████████████████████████| 31.3MB 1.7MB/s
Collecting Pillow (from wxPython)
  Downloading https://files.pythonhosted.org/packages/c9/ed/27cc92e99b9ccaa0985a66133baeea7e8a3371d3c04cfa353aaa3b81aac1/Pillow-5.4.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (3.7MB)
    100% |████████████████████████████████| 3.7MB 9.7MB/s
Collecting six (from wxPython)
  Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Installing collected packages: Pillow, six, wxPython
Successfully installed Pillow-5.4.1 six-1.12.0 wxPython-4.0.4
(test-py372) >  python
Python 3.7.2 (v3.7.2:9a3ffc0492, Dec 24 2018, 02:44:43)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> wx.version()
'4.0.4 osx-cocoa (phoenix) wxWidgets 3.0.5'
>>> app = wx.App()
>>> frm = wx.Frame(None, title="Hello")
>>> frm.Show()
True
>>> app.MainLoop()
0
>>> ^D


 

On Thu, Jan 17, 2019 at 12:30 PM Matt Newville <[hidden email]> wrote:
Yes, you need pythonw.  Which Python 3.7.2 are you using (Python org, MacPorts, Anaconda Python)? 

If using Anaconda Python, you'll need to do `conda install python.app`.

--Matt


On Thu, Jan 17, 2019 at 11:52 AM Ed Leafe <[hidden email]> wrote:
I recently installed wxPython 4.0.4 on my Mac running Python 3.7.2. When I run the following simple script:

import wx
wx.App()

I'm getting the "This program needs access to the screen" message. I remember from the Python 2 days that I needed to run 'pythonw' instead of 'python', but there doesn't seem to be an equivalent for Python 3. 

What am I missing?

--

 Ed Leafe

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.


--
Ed Leafe

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: wxPython 4.0.4 not running on OSX, Python 3.7.2

Ed Leafe-2
Strange - it doesn't work in the venv, but if I install wxPython into the main system Python, it does work.

On Thu, Jan 17, 2019 at 2:16 PM Robin Dunn <[hidden email]> wrote:
On Thursday, January 17, 2019 at 10:48:25 AM UTC-8, Ed Leafe wrote:
I was using 3.6 installed from brew, but more recently installed 3.7.2 from python.org.


Are you sure the python being executed is the one from the new install? The stock Python works for me:

 >  python3.7 -m venv test-py372
 >  wrangler test-py372
Python Wrangler: 2.7
Writing new activate_this.py script.
Activating environment with:
/Users/robind/.myPyEnv/test-py372/bin/activate
(test-py372) >  which python
/Users/robind/.myPyEnv/test-py372/bin/python
(test-py372) >  which pip
/Users/robind/.myPyEnv/test-py372/bin/pip
(test-py372) >  pip install wxPython
Collecting wxPython
    100% |████████████████████████████████| 31.3MB 1.7MB/s
Collecting Pillow (from wxPython)
    100% |████████████████████████████████| 3.7MB 9.7MB/s
Collecting six (from wxPython)
Installing collected packages: Pillow, six, wxPython
Successfully installed Pillow-5.4.1 six-1.12.0 wxPython-4.0.4
(test-py372) >  python
Python 3.7.2 (v3.7.2:9a3ffc0492, Dec 24 2018, 02:44:43)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> wx.version()
'4.0.4 osx-cocoa (phoenix) wxWidgets 3.0.5'
>>> app = wx.App()
>>> frm = wx.Frame(None, title="Hello")
>>> frm.Show()
True
>>> app.MainLoop()
0
>>> ^D


 

On Thu, Jan 17, 2019 at 12:30 PM Matt Newville <[hidden email]> wrote:
Yes, you need pythonw.  Which Python 3.7.2 are you using (Python org, MacPorts, Anaconda Python)? 

If using Anaconda Python, you'll need to do `conda install python.app`.

--Matt


On Thu, Jan 17, 2019 at 11:52 AM Ed Leafe <[hidden email]> wrote:
I recently installed wxPython 4.0.4 on my Mac running Python 3.7.2. When I run the following simple script:

import wx
wx.App()

I'm getting the "This program needs access to the screen" message. I remember from the Python 2 days that I needed to run 'pythonw' instead of 'python', but there doesn't seem to be an equivalent for Python 3. 

What am I missing?


--
Ed Leafe

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: wxPython 4.0.4 not running on OSX, Python 3.7.2

Robin Dunn
That is strange. I use venvs or similar almost exclusively these days, and its very seldom that I install anything into the real Python environment. It really should be working. Maybe something went wrong with the venv somehow when creating it or after that made it lose its connection back to the source Python, or something.

--
Robin


On Friday, January 18, 2019 at 1:48:43 PM UTC-8, Ed Leafe wrote:
Strange - it doesn't work in the venv, but if I install wxPython into the main system Python, it does work.

On Thu, Jan 17, 2019 at 2:16 PM Robin Dunn <[hidden email]> wrote:
On Thursday, January 17, 2019 at 10:48:25 AM UTC-8, Ed Leafe wrote:
I was using 3.6 installed from brew, but more recently installed 3.7.2 from <a href="http://python.org" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fpython.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF558DEk4MojQmCDwPIrITw2rjEQA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fpython.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF558DEk4MojQmCDwPIrITw2rjEQA&#39;;return true;">python.org.


Are you sure the python being executed is the one from the new install? The stock Python works for me:

 >  python3.7 -m venv test-py372
 >  wrangler test-py372
Python Wrangler: 2.7
Writing new activate_this.py script.
Activating environment with:
/Users/robind/.myPyEnv/test-py372/bin/activate
(test-py372) >  which python
/Users/robind/.myPyEnv/test-py372/bin/python
(test-py372) >  which pip
/Users/robind/.myPyEnv/test-py372/bin/pip
(test-py372) >  pip install wxPython
Collecting wxPython
  Downloading <a href="https://files.pythonhosted.org/packages/8d/d3/c77c2d557b67372986988c5d33ae8f8e41400129c8f6e3f63368f7aecbd3/wxPython-4.0.4-cp37-cp37m-macosx_10_9_x86_64.whl" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ffiles.pythonhosted.org%2Fpackages%2F8d%2Fd3%2Fc77c2d557b67372986988c5d33ae8f8e41400129c8f6e3f63368f7aecbd3%2FwxPython-4.0.4-cp37-cp37m-macosx_10_9_x86_64.whl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF0fVSMfD-nMu1JVwuLPOj1iU3DPw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ffiles.pythonhosted.org%2Fpackages%2F8d%2Fd3%2Fc77c2d557b67372986988c5d33ae8f8e41400129c8f6e3f63368f7aecbd3%2FwxPython-4.0.4-cp37-cp37m-macosx_10_9_x86_64.whl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF0fVSMfD-nMu1JVwuLPOj1iU3DPw&#39;;return true;">https://files.pythonhosted.org/packages/8d/d3/c77c2d557b67372986988c5d33ae8f8e41400129c8f6e3f63368f7aecbd3/wxPython-4.0.4-cp37-cp37m-macosx_10_9_x86_64.whl (31.3MB)
    100% |████████████████████████████████| 31.3MB 1.7MB/s
Collecting Pillow (from wxPython)
  Downloading <a href="https://files.pythonhosted.org/packages/c9/ed/27cc92e99b9ccaa0985a66133baeea7e8a3371d3c04cfa353aaa3b81aac1/Pillow-5.4.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ffiles.pythonhosted.org%2Fpackages%2Fc9%2Fed%2F27cc92e99b9ccaa0985a66133baeea7e8a3371d3c04cfa353aaa3b81aac1%2FPillow-5.4.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFSzf_0JwvrnzCQ-6BBDtwq78tl_w&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ffiles.pythonhosted.org%2Fpackages%2Fc9%2Fed%2F27cc92e99b9ccaa0985a66133baeea7e8a3371d3c04cfa353aaa3b81aac1%2FPillow-5.4.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFSzf_0JwvrnzCQ-6BBDtwq78tl_w&#39;;return true;">https://files.pythonhosted.org/packages/c9/ed/27cc92e99b9ccaa0985a66133baeea7e8a3371d3c04cfa353aaa3b81aac1/Pillow-5.4.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (3.7MB)
    100% |████████████████████████████████| 3.7MB 9.7MB/s
Collecting six (from wxPython)
  Using cached <a href="https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ffiles.pythonhosted.org%2Fpackages%2F73%2Ffb%2F00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9%2Fsix-1.12.0-py2.py3-none-any.whl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGOHqy3f9-ytOVLiHASQ4YnxzPHOA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ffiles.pythonhosted.org%2Fpackages%2F73%2Ffb%2F00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9%2Fsix-1.12.0-py2.py3-none-any.whl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGOHqy3f9-ytOVLiHASQ4YnxzPHOA&#39;;return true;">https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Installing collected packages: Pillow, six, wxPython
Successfully installed Pillow-5.4.1 six-1.12.0 wxPython-4.0.4
(test-py372) >  python
Python 3.7.2 (v3.7.2:9a3ffc0492, Dec 24 2018, 02:44:43)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> wx.version()
'4.0.4 osx-cocoa (phoenix) wxWidgets 3.0.5'
>>> app = wx.App()
>>> frm = wx.Frame(None, title="Hello")
>>> frm.Show()
True
>>> app.MainLoop()
0
>>> ^D


 

On Thu, Jan 17, 2019 at 12:30 PM Matt Newville <[hidden email]> wrote:
Yes, you need pythonw.  Which Python 3.7.2 are you using (Python org, MacPorts, Anaconda Python)? 

If using Anaconda Python, you'll need to do `conda install python.app`.

--Matt


On Thu, Jan 17, 2019 at 11:52 AM Ed Leafe <[hidden email]> wrote:
I recently installed wxPython 4.0.4 on my Mac running Python 3.7.2. When I run the following simple script:

import wx
wx.App()

I'm getting the "This program needs access to the screen" message. I remember from the Python 2 days that I needed to run 'pythonw' instead of 'python', but there doesn't seem to be an equivalent for Python 3. 

What am I missing?


--
Ed Leafe

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: wxPython 4.0.4 not running on OSX, Python 3.7.2

Robin Dunn
See also https://github.com/wxWidgets/Phoenix/issues/1148

--
Robin


On Saturday, January 19, 2019 at 1:29:06 PM UTC-8, Robin Dunn wrote:
That is strange. I use venvs or similar almost exclusively these days, and its very seldom that I install anything into the real Python environment. It really should be working. Maybe something went wrong with the venv somehow when creating it or after that made it lose its connection back to the source Python, or something.

--
Robin


On Friday, January 18, 2019 at 1:48:43 PM UTC-8, Ed Leafe wrote:
Strange - it doesn't work in the venv, but if I install wxPython into the main system Python, it does work.

On Thu, Jan 17, 2019 at 2:16 PM Robin Dunn <[hidden email]> wrote:
On Thursday, January 17, 2019 at 10:48:25 AM UTC-8, Ed Leafe wrote:
I was using 3.6 installed from brew, but more recently installed 3.7.2 from <a href="http://python.org" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fpython.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF558DEk4MojQmCDwPIrITw2rjEQA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fpython.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF558DEk4MojQmCDwPIrITw2rjEQA&#39;;return true;">python.org.


Are you sure the python being executed is the one from the new install? The stock Python works for me:

 >  python3.7 -m venv test-py372
 >  wrangler test-py372
Python Wrangler: 2.7
Writing new activate_this.py script.
Activating environment with:
/Users/robind/.myPyEnv/test-py372/bin/activate
(test-py372) >  which python
/Users/robind/.myPyEnv/test-py372/bin/python
(test-py372) >  which pip
/Users/robind/.myPyEnv/test-py372/bin/pip
(test-py372) >  pip install wxPython
Collecting wxPython
  Downloading <a href="https://files.pythonhosted.org/packages/8d/d3/c77c2d557b67372986988c5d33ae8f8e41400129c8f6e3f63368f7aecbd3/wxPython-4.0.4-cp37-cp37m-macosx_10_9_x86_64.whl" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ffiles.pythonhosted.org%2Fpackages%2F8d%2Fd3%2Fc77c2d557b67372986988c5d33ae8f8e41400129c8f6e3f63368f7aecbd3%2FwxPython-4.0.4-cp37-cp37m-macosx_10_9_x86_64.whl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF0fVSMfD-nMu1JVwuLPOj1iU3DPw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ffiles.pythonhosted.org%2Fpackages%2F8d%2Fd3%2Fc77c2d557b67372986988c5d33ae8f8e41400129c8f6e3f63368f7aecbd3%2FwxPython-4.0.4-cp37-cp37m-macosx_10_9_x86_64.whl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF0fVSMfD-nMu1JVwuLPOj1iU3DPw&#39;;return true;">https://files.pythonhosted.org/packages/8d/d3/c77c2d557b67372986988c5d33ae8f8e41400129c8f6e3f63368f7aecbd3/wxPython-4.0.4-cp37-cp37m-macosx_10_9_x86_64.whl (31.3MB)
    100% |████████████████████████████████| 31.3MB 1.7MB/s
Collecting Pillow (from wxPython)
  Downloading <a href="https://files.pythonhosted.org/packages/c9/ed/27cc92e99b9ccaa0985a66133baeea7e8a3371d3c04cfa353aaa3b81aac1/Pillow-5.4.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ffiles.pythonhosted.org%2Fpackages%2Fc9%2Fed%2F27cc92e99b9ccaa0985a66133baeea7e8a3371d3c04cfa353aaa3b81aac1%2FPillow-5.4.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFSzf_0JwvrnzCQ-6BBDtwq78tl_w&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ffiles.pythonhosted.org%2Fpackages%2Fc9%2Fed%2F27cc92e99b9ccaa0985a66133baeea7e8a3371d3c04cfa353aaa3b81aac1%2FPillow-5.4.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFSzf_0JwvrnzCQ-6BBDtwq78tl_w&#39;;return true;">https://files.pythonhosted.org/packages/c9/ed/27cc92e99b9ccaa0985a66133baeea7e8a3371d3c04cfa353aaa3b81aac1/Pillow-5.4.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (3.7MB)
    100% |████████████████████████████████| 3.7MB 9.7MB/s
Collecting six (from wxPython)
  Using cached <a href="https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ffiles.pythonhosted.org%2Fpackages%2F73%2Ffb%2F00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9%2Fsix-1.12.0-py2.py3-none-any.whl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGOHqy3f9-ytOVLiHASQ4YnxzPHOA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ffiles.pythonhosted.org%2Fpackages%2F73%2Ffb%2F00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9%2Fsix-1.12.0-py2.py3-none-any.whl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGOHqy3f9-ytOVLiHASQ4YnxzPHOA&#39;;return true;">https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Installing collected packages: Pillow, six, wxPython
Successfully installed Pillow-5.4.1 six-1.12.0 wxPython-4.0.4
(test-py372) >  python
Python 3.7.2 (v3.7.2:9a3ffc0492, Dec 24 2018, 02:44:43)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> wx.version()
'4.0.4 osx-cocoa (phoenix) wxWidgets 3.0.5'
>>> app = wx.App()
>>> frm = wx.Frame(None, title="Hello")
>>> frm.Show()
True
>>> app.MainLoop()
0
>>> ^D


 

On Thu, Jan 17, 2019 at 12:30 PM Matt Newville <[hidden email]> wrote:
Yes, you need pythonw.  Which Python 3.7.2 are you using (Python org, MacPorts, Anaconda Python)? 

If using Anaconda Python, you'll need to do `conda install python.app`.

--Matt


On Thu, Jan 17, 2019 at 11:52 AM Ed Leafe <[hidden email]> wrote:
I recently installed wxPython 4.0.4 on my Mac running Python 3.7.2. When I run the following simple script:

import wx
wx.App()

I'm getting the "This program needs access to the screen" message. I remember from the Python 2 days that I needed to run 'pythonw' instead of 'python', but there doesn't seem to be an equivalent for Python 3. 

What am I missing?


--
Ed Leafe

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: wxPython 4.0.4 not running on OSX, Python 3.7.2

Ed Leafe-2
Hmm... I sent a reply to this a few days ago, and it doesn't seem to have been posted. I wrote:

I use virtualenv exclusively, and have never had a problem until now. I made a new env using Python’s venv as you suggested, and it’s working fine. So it seems that virtualenv was the issue.

Thanks for the help!



On Tuesday, January 22, 2019 at 12:55:32 AM UTC-6, Robin Dunn wrote:
See also <a href="https://github.com/wxWidgets/Phoenix/issues/1148" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FwxWidgets%2FPhoenix%2Fissues%2F1148\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFM1RHXeXxa1caxU8-Qjl6beSTysw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FwxWidgets%2FPhoenix%2Fissues%2F1148\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFM1RHXeXxa1caxU8-Qjl6beSTysw&#39;;return true;">https://github.com/wxWidgets/Phoenix/issues/1148

--
Robin


On Saturday, January 19, 2019 at 1:29:06 PM UTC-8, Robin Dunn wrote:
That is strange. I use venvs or similar almost exclusively these days, and its very seldom that I install anything into the real Python environment. It really should be working. Maybe something went wrong with the venv somehow when creating it or after that made it lose its connection back to the source Python, or something.

--
Robin


On Friday, January 18, 2019 at 1:48:43 PM UTC-8, Ed Leafe wrote:
Strange - it doesn't work in the venv, but if I install wxPython into the main system Python, it does work.

On Thu, Jan 17, 2019 at 2:16 PM Robin Dunn <<a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="dwr6YyenEAAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">ro...@...> wrote:
On Thursday, January 17, 2019 at 10:48:25 AM UTC-8, Ed Leafe wrote:
I was using 3.6 installed from brew, but more recently installed 3.7.2 from <a href="http://python.org" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fpython.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF558DEk4MojQmCDwPIrITw2rjEQA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fpython.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF558DEk4MojQmCDwPIrITw2rjEQA&#39;;return true;">python.org.


Are you sure the python being executed is the one from the new install? The stock Python works for me:

 >  python3.7 -m venv test-py372
 >  wrangler test-py372
Python Wrangler: 2.7
Writing new activate_this.py script.
Activating environment with:
/Users/robind/.myPyEnv/test-py372/bin/activate
(test-py372) >  which python
/Users/robind/.myPyEnv/test-py372/bin/python
(test-py372) >  which pip
/Users/robind/.myPyEnv/test-py372/bin/pip
(test-py372) >  pip install wxPython
Collecting wxPython
  Downloading <a href="https://files.pythonhosted.org/packages/8d/d3/c77c2d557b67372986988c5d33ae8f8e41400129c8f6e3f63368f7aecbd3/wxPython-4.0.4-cp37-cp37m-macosx_10_9_x86_64.whl" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ffiles.pythonhosted.org%2Fpackages%2F8d%2Fd3%2Fc77c2d557b67372986988c5d33ae8f8e41400129c8f6e3f63368f7aecbd3%2FwxPython-4.0.4-cp37-cp37m-macosx_10_9_x86_64.whl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF0fVSMfD-nMu1JVwuLPOj1iU3DPw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ffiles.pythonhosted.org%2Fpackages%2F8d%2Fd3%2Fc77c2d557b67372986988c5d33ae8f8e41400129c8f6e3f63368f7aecbd3%2FwxPython-4.0.4-cp37-cp37m-macosx_10_9_x86_64.whl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF0fVSMfD-nMu1JVwuLPOj1iU3DPw&#39;;return true;">https://files.pythonhosted.org/packages/8d/d3/c77c2d557b67372986988c5d33ae8f8e41400129c8f6e3f63368f7aecbd3/wxPython-4.0.4-cp37-cp37m-macosx_10_9_x86_64.whl (31.3MB)
    100% |████████████████████████████████| 31.3MB 1.7MB/s
Collecting Pillow (from wxPython)
  Downloading <a href="https://files.pythonhosted.org/packages/c9/ed/27cc92e99b9ccaa0985a66133baeea7e8a3371d3c04cfa353aaa3b81aac1/Pillow-5.4.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ffiles.pythonhosted.org%2Fpackages%2Fc9%2Fed%2F27cc92e99b9ccaa0985a66133baeea7e8a3371d3c04cfa353aaa3b81aac1%2FPillow-5.4.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFSzf_0JwvrnzCQ-6BBDtwq78tl_w&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ffiles.pythonhosted.org%2Fpackages%2Fc9%2Fed%2F27cc92e99b9ccaa0985a66133baeea7e8a3371d3c04cfa353aaa3b81aac1%2FPillow-5.4.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFSzf_0JwvrnzCQ-6BBDtwq78tl_w&#39;;return true;">https://files.pythonhosted.org/packages/c9/ed/27cc92e99b9ccaa0985a66133baeea7e8a3371d3c04cfa353aaa3b81aac1/Pillow-5.4.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (3.7MB)
    100% |████████████████████████████████| 3.7MB 9.7MB/s
Collecting six (from wxPython)
  Using cached <a href="https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ffiles.pythonhosted.org%2Fpackages%2F73%2Ffb%2F00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9%2Fsix-1.12.0-py2.py3-none-any.whl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGOHqy3f9-ytOVLiHASQ4YnxzPHOA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ffiles.pythonhosted.org%2Fpackages%2F73%2Ffb%2F00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9%2Fsix-1.12.0-py2.py3-none-any.whl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGOHqy3f9-ytOVLiHASQ4YnxzPHOA&#39;;return true;">https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Installing collected packages: Pillow, six, wxPython
Successfully installed Pillow-5.4.1 six-1.12.0 wxPython-4.0.4
(test-py372) >  python
Python 3.7.2 (v3.7.2:9a3ffc0492, Dec 24 2018, 02:44:43)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> wx.version()
'4.0.4 osx-cocoa (phoenix) wxWidgets 3.0.5'
>>> app = wx.App()
>>> frm = wx.Frame(None, title="Hello")
>>> frm.Show()
True
>>> app.MainLoop()
0
>>> ^D


 

On Thu, Jan 17, 2019 at 12:30 PM Matt Newville <<a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="dwr6YyenEAAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">newv...@...> wrote:
Yes, you need pythonw.  Which Python 3.7.2 are you using (Python org, MacPorts, Anaconda Python)? 

If using Anaconda Python, you'll need to do `conda install python.app`.

--Matt


On Thu, Jan 17, 2019 at 11:52 AM Ed Leafe <<a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="dwr6YyenEAAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">edl...@...> wrote:
I recently installed wxPython 4.0.4 on my Mac running Python 3.7.2. When I run the following simple script:

import wx
wx.App()

I'm getting the "This program needs access to the screen" message. I remember from the Python 2 days that I needed to run 'pythonw' instead of 'python', but there doesn't seem to be an equivalent for Python 3. 

What am I missing?


--
Ed Leafe

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.