Closed hx2A closed 2 years ago
Update on the current situation:
%gui osx
magic before importing py5. If you forget to use the magic it will be done for you and you will see a warning. py5 will work fine for OSX users for this case.run_sketch
command line utility uses the pyobjc library to perform the same sorcery that %gui osx
does and makes py5 work on osx. Note that %gui osx
is not available outside of Jupyter. py5 fill work fine for OSX users who are using the run_sketch
utility.gui osx
is not available and the pyobjc stuff is not (yet) present.%gui osx
entirely. This may not be possible though given what the IPython kernel already does for animation threads, but it also isn't that important, as calling %gui osx
is not big deal. It should be possible to use pyojbc to get py5 working with the generic python interpreter. I have a partially working solution for this and will complete it at some point.
Currenttly py5 does not work with the generic python interpreter on OSX because
gui osx
is not available and the pyobjc stuff is not (yet) present.Eventually I would like to use pyobjc for running py5 sketches anywhere on OSX, eliminating the need for
%gui osx
entirely. This may not be possible though given what the IPython kernel already does for animation threads, but it also isn't that important, as calling%gui osx
is not big deal. It should be possible to use pyojbc to get py5 working with the generic python interpreter. I have a partially working solution for this and will complete it at some point.
With release 0.7.2, released very soon, this will be resolved. py5 will use pyobjc when executing sketches through the generic python interpreter.
py5 doesn't work on OSX without using Jupyter and
%gui osx
magic. The sketch will be running but the window is not visible.run_sketch
frame_count
number will be increasing and the output of print statements will appearIdeally, py5 should work with a regular Python interpreter. I can live with the fact that the
%gui osx
magic is necessary when using Jupyter notebooks, but this leaves a dependency on Jupyter. Users may want to create a Python script to run a Sketch without having to use Jupyter.py5 uses JPype as the Python-Java bridge, and there is a known issue in JPype related to this. I believe this problem is dependent on a fix for this JPype issue.