Skip to content

macOS 12.3 Beta has removed the Python 2 support: spawn /usr/bin/python ENOENT #6606

@pan93412

Description

@pan93412
  • Electron-Builder Version: 22.13.1
  • Node Version: v16.13.1
  • Electron Version: 16.0.8
  • Electron Type (current, beta, nightly): current
  • electron-updater Version: 4.6.5
  • Target: macOS (x86, ARM64, universal?)

macOS 12.3 has removed the Python 2 support; thus, /usr/bin/python has been removed. electron-builder tries to call /usr/bin/python and it throws Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT.

Reproducible Step

# Clone the minimum reproducible boilerplate
git clone [email protected]:electron-react-boilerplate/electron-react-boilerplate.git
cd electron-react-boilerplate

# Install dependencies
npm i

# Upgrade to the latest patch version
npm upgrade

# Package (it throws here)
npm run package

Full Log

$ npm run package
> package
> ts-node ./.erb/scripts/clean.js dist && npm run build && electron-builder build --publish never


> build
> concurrently "npm run build:main" "npm run build:renderer"

[1]
[1] > build:renderer
[1] > cross-env NODE_ENV=production TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.renderer.prod.ts
[1]
[0]
[0] > build:main
[0] > cross-env NODE_ENV=production TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.main.prod.ts
[0]
[1] npm run build:renderer exited with code 0
[0] npm run build:main exited with code 0
  • electron-builder  version=22.13.1 os=21.4.0
  • loaded configuration  file=package.json ("build" field)
  • writing effective config  file=release/build/builder-effective-config.yaml
  • installing production dependencies  platform=darwin arch=arm64 appDir=/Users/pan93412/Projects/electron-react-boilerplate/release/app
  • packaging       platform=darwin arch=arm64 electron=16.0.8 appOutDir=release/build/mac-arm64
  • downloading     url=https://github.com/electron/electron/releases/download/v16.0.8/electron-v16.0.8-darwin-arm64.zip size=88 MB parts=8
  • downloaded      url=https://github.com/electron/electron/releases/download/v16.0.8/electron-v16.0.8-darwin-arm64.zip duration=22.373s
  • skipped macOS application code signing  reason=cannot find valid "Developer ID Application" identity or custom non-Apple code signing certificate, see https://electron.build/code-signing allIdentities=     0 identities found
                                                Valid identities only
     0 valid identities found
Skipping notarizing step. Packaging is not running in CI
  • building        target=macOS zip arch=arm64 file=release/build/ElectronReact-4.5.0-arm64-mac.zip
  • building        target=DMG arch=arm64 file=release/build/ElectronReact-4.5.0-arm64.dmg
  • installing production dependencies  platform=darwin arch=x64 appDir=/Users/pan93412/Projects/electron-react-boilerplate/release/app
  • Detected arm64 process, HFS+ is unavailable. Creating dmg with APFS - supports Mac OSX 10.12+
  • packaging       platform=darwin arch=x64 electron=16.0.8 appOutDir=release/build/mac
  • downloading     url=https://github.com/electron/electron/releases/download/v16.0.8/electron-v16.0.8-darwin-x64.zip size=83 MB parts=8
  • downloaded      url=https://github.com/electron/electron/releases/download/v16.0.8/electron-v16.0.8-darwin-x64.zip duration=19.803s
  • skipped macOS application code signing  reason=cannot find valid "Developer ID Application" identity or custom non-Apple code signing certificate, see https://electron.build/code-signing allIdentities=     0 identities found
                                                Valid identities only
     0 valid identities found
Skipping notarizing step. Packaging is not running in CI
  • building        target=macOS zip arch=x64 file=release/build/ElectronReact-4.5.0-mac.zip
  • building        target=DMG arch=x64 file=release/build/ElectronReact-4.5.0.dmg
  • Detected arm64 process, HFS+ is unavailable. Creating dmg with APFS - supports Mac OSX 10.12+
  ⨯ Exit code: ENOENT. spawn /usr/bin/python ENOENT  failedTask=build stackTrace=Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT
    at /Users/pan93412/Projects/electron-react-boilerplate/node_modules/builder-util/src/util.ts:133:18
    at exithandler (node:child_process:404:5)
    at ChildProcess.errorhandler (node:child_process:416:5)
    at ChildProcess.emit (node:events:390:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12)
    at onErrorNT (node:internal/child_process:477:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
  • Above command failed, retrying 5 more times
  • building block map  blockMapFile=release/build/ElectronReact-4.5.0-arm64-mac.zip.blockmap
  • Above command failed, retrying 4 more times
  • Above command failed, retrying 3 more times
  • Above command failed, retrying 2 more times
  • Above command failed, retrying 1 more times
  • Above command failed, retrying 0 more times
  • building block map  blockMapFile=release/build/ElectronReact-4.5.0-mac.zip.blockmap

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions