New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error during build steps on macos #16311
Comments
After the lab call I realised that the CI is running on arm Macs so it should be tested and we should have caught it. The difference appears to be that you are using Python 3.12 and the CI is using 3.11: jupyterlab/.github/workflows/macostests.yml Lines 11 to 17 in 66bc3b0
It is easy to add 3.12 to the matrix, the problem is that Mac tests are timing out so frequently because the GitHub runners for MacOS are under-powered compared to Linux and Windows runners. However, adding something like:
Seems like a good trade-off. |
I can reproduce this on CI when running with Python 3.12: https://github.com/jupyterlab/jupyterlab/actions/runs/9029765269/job/24812738688?pr=16314 (#16314). As per nodejs/node-gyp#2869 this was fixed in node-gyp v10+. We do not depend on node-gyp directly so we cannot just bump it. We could force a resolution, but ideally we would track down which dependencies depend on it for compilation. |
Beside the issue with node-gyp, it is worth to rewind to see that it is only used because there are no pre-compiled binaries for node-canvas for arm64 macs, as seen in logs:
The upstream PR Automattic/node-canvas#2354 would solve it and simplify the install instructions. |
The alternative is to remove the canvas dependency. It is essentially used only in tests to mock the
jupyterlab/packages/debugger/package.json Line 85 in 66bc3b0
Maybe we could use |
Attempting this in 437ebec |
@krassowski Thanks for your work on this, I'm sure this fix will become more necessary over time as adoption of newer versions of Python increases :) |
Description
Cannot build vanilla clone of the Lab repo using the "setting up a local development environment" and "installing jupyterlab" section steps on macos/Python 3.12.
This may be related to the Canvas package build (a dependency), possibly involving node-gyp and/or possibly due to distutils usage during a build substep (which was deprecated and removed in Python 3.12...). @krassowski suggested that upgrading the dependency may be a solution.
Reproduce
Follow these steps from the contributor guide:
^Note that an error happens on
pip install -e ".[dev,test]"
.Context
Error encountered on pip install
Log file content referenced in the error message:
The text was updated successfully, but these errors were encountered: