question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how to run a Framework build of python (and can that requirement be added to the installation instructions?)

See original GitHub issue
  • [x ] OS - Mac
  • [ x] Python Version - Python 2.7.14 :: Anaconda, Inc.

I saw the message about needing a Windows framework (which wasn’t mentioned in the installation instructions)

$ python example_progress_bar_1.py
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.

figured out that I could do this

conda install python.app

Here’s what I get when I try to run pythonw on the simple_demo.py in the example files

$ pythonw simple_demo.py
Traceback (most recent call last):
  File "simple_demo.py", line 28, in <module>
    main()
  File "/Users/mr/anaconda2/lib/python2.7/site-packages/Gooey-1.0.0-py2.7.egg/gooey/python_bindings/gooey_decorator.py", line 83, in inner2
    return payload(*args, **kwargs)
  File "simple_demo.py", line 24, in main
    args = parser.parse_args()
  File "/Users/mr/anaconda2/lib/python2.7/site-packages/Gooey-1.0.0-py2.7.egg/gooey/python_bindings/gooey_parser.py", line 113, in parse_args
    return self.parser.parse_args(args, namespace)
  File "/Users/mr/anaconda2/lib/python2.7/site-packages/Gooey-1.0.0-py2.7.egg/gooey/python_bindings/gooey_decorator.py", line 78, in run_gooey
    application.run(build_spec)
  File "/Users/mr/anaconda2/lib/python2.7/site-packages/Gooey-1.0.0-py2.7.egg/gooey/gui/application.py", line 15, in run
    app = build_app(build_spec)
  File "/Users/marjorieroswell/anaconda2/lib/python2.7/site-packages/Gooey-1.0.0-py2.7.egg/gooey/gui/application.py", line 24, in build_app
    gapp = GooeyApplication(merge(build_spec, imagesPaths))
  File "/Users/mr/anaconda2/lib/python2.7/site-packages/Gooey-1.0.0-py2.7.egg/gooey/gui/containers/application.py", line 39, in __init__
    self.header = FrameHeader(self, buildSpec)
  File "/Users/mr/anaconda2/lib/python2.7/site-packages/Gooey-1.0.0-py2.7.egg/gooey/gui/components/header.py", line 33, in __init__
    self.layoutComponent()
  File "/Users/mr/anaconda2/lib/python2.7/site-packages/Gooey-1.0.0-py2.7.egg/gooey/gui/components/header.py", line 60, in layoutComponent
    self.settings_img = self._load_image(images['configIcon'], targetHeight)
  File "/Users/mr/anaconda2/lib/python2.7/site-packages/Gooey-1.0.0-py2.7.egg/gooey/gui/components/header.py", line 92, in _load_image
    return imageutil.wrapBitmap(sizedImage, self)
  File "/Users/mr/anaconda2/lib/python2.7/site-packages/Gooey-1.0.0-py2.7.egg/gooey/gui/imageutil.py", line 23, in wrapBitmap
    bitmapData = wx.Bitmap.FromBufferRGBA(im.size[0], im.size[1], im.convert('RGBA').tobytes())
AttributeError: type object 'Bitmap' has no attribute 'FromBufferRGBA' 

I guess pythonw isn’t the right thing to run a Framework build of python. Maybe this has something to do with wxPython, but

$ wxPython simple_demo.py

doesn’t work… What should I be doing to run a Framework build of python?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:17 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
smoltiscommented, Apr 3, 2018

In Anaconda distribution you can use “pythonw” instead. It will use Framework version of python. Like so,

pythonw simple_demo.py

2reactions
SagaciousZedcommented, May 31, 2020

I have identify the debug information being printed out. It is the verbose output from Python. THe culprit is that we have set the verbose flag in the options passed in the spec

options = [('u', None, 'OPTION'), ('v', None, 'OPTION'), ('w', None, 'OPTION')]

We are probably better off only setting

options= [('u', None, 'OPTION')]

Once I did that in my build all the verbose output went away.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setup and Building - Python Developer's Guide
These instructions cover how to get a working copy of the source code and a compiled version of the CPython interpreter (CPython is...
Read more >
python - wxPython: This program needs access to the screen
Running this snippet returns the following: This program needs access to the screen. Please run with a Framework build of python, and only...
Read more >
Using PyInstaller to Easily Distribute Python Applications
In this step-by-step tutorial, you'll learn how to use PyInstaller to turn your Python application into an executable with no dependencies or installation...
Read more >
Build and test Python applications | Cloud Build Documentation
Configuring Python builds ... This section walks through an example build config file for a Python app. It has build steps to install...
Read more >
Python on the HPC Clusters - Princeton Research Computing
This guide presents an overview of installing Python packages and running Python ... In addition to Python's vast built-in library , Anaconda provides ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found