Skip to content
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

Python 3.12 build error "No module named 'distutils'" - Rev2 #30955

Open
MikeMcC399 opened this issue Jan 27, 2025 · 3 comments
Open

Python 3.12 build error "No module named 'distutils'" - Rev2 #30955

MikeMcC399 opened this issue Jan 27, 2025 · 3 comments
Labels
process: contributing Related to contributing to the Cypress codebase type: chore Work is required w/ no deliverable to end user

Comments

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Jan 27, 2025

Current behavior

  • There has been a regression in the develop branch and Python 3.11 is required once again to build Cypress from source without error on Ubuntu. This means also that Ubuntu 24.10 cannot be used because it doesn't have access to Python 3.11. Ubuntu 24.10 only supports the default Python 3.12 version.

The yarn install log contains the error message:

ModuleNotFoundError: No module named 'distutils'

Desired behavior

Test code to reproduce

git clone https://github.com/cypress-io/cypress
cd cypress
npm install yarn@latest -g
yarn

Cypress Version

First reported on Cypress version: 14.0.0
Reproducible also on Cypress version: 14.0.1

Node version

v22.13.1 LTS

Operating System

Ubuntu 24.10

Debug Logs

Failure logs are basically the same as for #28695

node-gyp@9 has come back:

$ yarn why node-gyp
yarn why v1.22.22
[1/4] Why do we have the module "node-gyp"...?
[2/4] Initialising dependency graph...
warning Resolution field "pretty-format@26.4.0" is incompatible with requested version "pretty-format@^29.7.0"
warning Resolution field "@wdio/logger@9.0.0" is incompatible with requested version "@wdio/logger@^8.38.0"
warning Resolution field "devtools-protocol@0.0.1346313" is incompatible with requested version "devtools-protocol@0.0.927104"
warning Resolution field "@types/react@18.3.12" is incompatible with requested version "@types/react@^16"
warning Resolution field "devtools-protocol@0.0.1346313" is incompatible with requested version "devtools-protocol@0.0.1159816"
warning Resolution field "pretty-format@26.4.0" is incompatible with requested version "pretty-format@^27.0.2"
warning Resolution field "vue-template-compiler@2.6.12" is incompatible with requested version "vue-template-compiler@^2.7.14"
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "node-gyp@10.2.0"
info Has been hoisted to "node-gyp"
info Reasons this module exists
   - "workspace-aggregator-1c2bd76a-9823-44e1-a258-533b690a1802" depends on it
   - Hoisted from "_project_#@npmcli#run-script#node-gyp"
   - Hoisted from "_project_#@npmcli#arborist#@npmcli#run-script#node-gyp"
   - Hoisted from "_project_#semantic-release#@semantic-release#npm#npm#node-gyp"
   - Hoisted from "_project_#@npmcli#arborist#@npmcli#metavuln-calculator#pacote#@npmcli#run-script#node-gyp"
info Disk size without dependencies: "4.1MB"
info Disk size with unique dependencies: "5.2MB"
info Disk size with transitive dependencies: "10.47MB"
info Number of shared dependencies: 59
=> Found "app-builder-lib#node-gyp@9.4.1"
info Reasons this module exists
   - "_project_#electron-builder#app-builder-lib#@electron#rebuild" depends on it
   - Hoisted from "_project_#electron-builder#app-builder-lib#@electron#rebuild#node-gyp"
info Disk size without dependencies: "2.06MB"
info Disk size with unique dependencies: "4.95MB"
info Disk size with transitive dependencies: "11.14MB"
info Number of shared dependencies: 83
@MikeMcC399
Copy link
Contributor Author

This is probably not an urgent issue judging by the fact that it hasn't been otherwise reported and the problem would have been apparent from early Dec 2024.

@jennifer-shehane jennifer-shehane added process: contributing Related to contributing to the Cypress codebase type: chore Work is required w/ no deliverable to end user labels Jan 27, 2025
@MikeMcC399
Copy link
Contributor Author

Whilst this issue is unresolved, the Python 3.11 instructions for Ubuntu 24.04 can be viewed under

https://github.com/cypress-io/cypress/blob/8dc09ea5165bb80babf32fc4af990fe9d993df24/CONTRIBUTING.md#requirements

@MikeMcC399
Copy link
Contributor Author

I did a smoke test build, updating to electron-builder@26.0.0. If there is a need for a PR, I can submit one, otherwise I will hold back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
process: contributing Related to contributing to the Cypress codebase type: chore Work is required w/ no deliverable to end user
Projects
None yet
Development

No branches or pull requests

2 participants