According to Python 3 documentation, python and pythonw should be equivalent for running GUI scripts as of 3.6
With older versions of Python, there is one Mac OS X quirk that you need to be aware of: programs that talk to the Aqua window manager (in other words, anything that has a GUI) need to be run in a special way. Use pythonw instead of python to start such scripts.
With Python 3.6, you can use either python or pythonw.
However, I just installed Anaconda with Python 3.6, and I still get the non-framework-build error if I try to run my wxPython GUI using python instead of pythonw:
This program needs access to the screen. Please run with a
Framework build of python, and only when you are logged in
on the main display of your Mac.
What is going on here? Why does this error persist?
The version of Python I am using is:
Python 3.6.0 :: Anaconda 4.3.1 (x86_64)
The answer can be found here: How to use a framework build of Python with Anaconda
In short, use command
conda install python.app
and pythonw will be installed.
I believe you can also just run your python script using pythonw
instead of python
. You'll need to use pythonw
for GUI related programs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With