Skip to content

fix: use versioned Python path on macOS install#3

Open
GregcodeOhm wants to merge 2 commits intoLucterios2:masterfrom
GregcodeOhm:fix/macos-python-version-detection
Open

fix: use versioned Python path on macOS install#3
GregcodeOhm wants to merge 2 commits intoLucterios2:masterfrom
GregcodeOhm:fix/macos-python-version-detection

Conversation

@GregcodeOhm
Copy link

Summary

  • On macOS, brew install python@3.13 does not create an unversioned python3 symlink. The script then falls back to /usr/bin/python3 (system Python 3.9) or picks up an unsupported version like 3.14, causing the install to fail.
  • This fix resolves the Python binary by its explicit versioned path (e.g. $BREW_PATH/bin/python3.13) instead of relying on the unversioned python3.
  • Also upgrades the hard-coded python@3.11 to a cascading install (3.13 || 3.12 || 3.11 || 3.10).

Reproduction

  1. Have Homebrew installed on macOS with no python3 symlink in /opt/homebrew/bin/
  2. Run the Diacamma DMG installer
  3. Script installs python@3.13 successfully, then calls python3 --version → gets system 3.9 → Error: Not Python 3.10, 3.11, 3.12 or 3.13 (but 3.9)

Test plan

  • Test on a clean macOS with only system Python (3.9)
  • Test on macOS where python3 already points to a supported version (should still work)
  • Test on macOS where python3 points to 3.14 via Homebrew

🤖 Generated with Claude Code

Greg and others added 2 commits March 26, 2026 16:30
On systems where the unversioned "python3" symlink points to macOS
system Python (3.9) or a newer unsupported Homebrew version (3.14),
the install script fails with a version check error.

This fix resolves the installed Python by its explicit versioned path
(e.g. python3.13) under $BREW_PATH/bin, and also upgrades the
hard-coded python@3.11 to a cascading install (3.13 > 3.12 > 3.11 > 3.10).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
After the venv is activated, $PYTHON_CMD points to the system Python
(outside the venv) where PyQt6 is not installed. This causes the
import to fail, and set -e kills the script before creating the
.app bundle. Use `python` (resolved by the active venv) and add
`|| true` to handle the case where PyQt6 is not available.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant