-
I just ran through the install process on my Mac. I run Ventura with Homebrew and all of the pre-reqs are installed. When I run the quick example in a virtual environment and repl, I received the following error from py5: Unable to obtain source code for setup(). Either make it obtainable or create a settings() function for calls to size(), fullscreen(), etc.
py5 encountered an error in your code:
File "<stdin>", line 2, in setup
RuntimeError: Cannot call the size() method here. Either move it to a settings() function or move it to closer to the start of setup(). I did not see anything specific to this issue in the Mac OSX notes. Is there some other thing I need to do to run this from the python repl? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Welcome, @drpjm ! I think you are running the example code in the generic Python interpreter. Can you use IPython instead, or put the example code in a file and run it from the command line with py5, like Processing, does some magic to allow you to put method calls such as I looked at the installation documentation and I see the "Here is a quick py5 example to test that everything works" statement should say to test with IPython or by saving the code to a file. I will update this so others don't also run into the same problem. |
Beta Was this translation helpful? Give feedback.
Great, I expect that will work well for you.
I just updated the install docs so future users will benefit from this discussion. Thanks again for your interest in py5 and your contribution!