py5coding / py5generator

Meta-programming project that creates the py5 library code.
GNU General Public License v3.0
48 stars 13 forks source link

Fix ipykernel>=6.29.5 to avoid problems in M macs #479

Closed ivanlen closed 2 weeks ago

ivanlen commented 2 weeks ago

Fixes #456

hx2A commented 2 weeks ago

Hi @ivanlen ! Thank you for your interest in improving py5 and for this PR.

Unfortunately, this PR is not correct. The environment.yml file is an Anaconda config file used to create the py5 development environment. That file does not control the py5 library's dependencies (although the files in the dev environment are a super-set of py5's dependencies).

To change py5's library dependencies, you'd need to update the pyproject.toml file. This file contains dependencies because of how py5's build process works. Many projects also have pyproject.toml files, but there are other packaging mechanisms. Some put requirements in a setup.py file, for example.

However, py5 doesn't depend on ipykernel to run, and shouldn't have that dependency. If every py5 user had to install ipykernel also, it would complicate installation and setup for the Thonny users who don't use IPython or Jupyter at all.

The place to update the dependency is in py5jupyter. Specifically, right here:

https://github.com/py5coding/py5jupyter/blob/81f241d3f12a69dd17ba11b702ed1762caa648ab/pyproject.toml#L35

py5jupyter does depend on ipykernel, but currently will accept an eariler version. Bumping that up from >=6.19 to >=6.29.5 would be the best path forward here. Can you make a PR for that change instead?

Also, yesterday I bought a Apple M1 computer. When it arrives, I'll do some experiments to get up to speed on those machines so I understand this problem better. When I'm done with that, I'll merge your new PR.

Thanks!

ivanlen commented 2 weeks ago

Oh yeah, makes completely sense. Since I installed py5 a couple of weeks ago and wasn't using it (because it wasn't working on M macs) I forgot about py5jupyter. Closing this one and making the PR were it should be done :) .

Nice that you bought a new Mac. If you are using the GPU you are going to notice the difference :) .

ivanlen commented 2 weeks ago

https://github.com/py5coding/py5jupyter/pull/16