Skip to content

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

Open
@MikeMcC399

Description

@MikeMcC399

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 and above interim versions cannot be used because they don't have access to Python 3.11. Ubuntu 24.10 and other interim versions only support 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.3

Node version

v20.18.1 LTS

Operating System

Ubuntu 24.10
Ubuntu 25.04

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 "[email protected]" is incompatible with requested version "pretty-format@^29.7.0"
warning Resolution field "@wdio/[email protected]" is incompatible with requested version "@wdio/logger@^8.38.0"
warning Resolution field "[email protected]" is incompatible with requested version "[email protected]"
warning Resolution field "@types/[email protected]" is incompatible with requested version "@types/react@^16"
warning Resolution field "[email protected]" is incompatible with requested version "[email protected]"
warning Resolution field "[email protected]" is incompatible with requested version "pretty-format@^27.0.2"
warning Resolution field "[email protected]" is incompatible with requested version "vue-template-compiler@^2.7.14"
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "[email protected]"
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#[email protected]"
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    process: contributingRelated to contributing to the Cypress codebasetype: choreWork is required w/ no deliverable to end user

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions