Skip to content

Hidden build dependency on Python 2 #35

@mferber

Description

@mferber

A dependency of this project (xpc-connect) seems to be dependent on Python 2 to build, which is a problem on macOS now that Python isn't bundled with the OS anymore. This is in no way bleno's problem, but it would be helpful to add it to the Mac installation instructions.

It works for me when Python 2 is installed with pyenv and either python or python2 points to it. Also possible that upgrading the xpc-connect dependency might solve the problem, as it has a recent commit related to Mac versions (though not obviously having anything to do with Python).

With only Python 3 installed, npm install produces the following.

Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: ...
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@18.4.0 | darwin | x64
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /Users/xxx/.pyenv/shims/python -c import sys; print \"%s.%s.%s\" % sys.version_info[:3];
gyp ERR! stack   File \"<string>\", line 1
gyp ERR! stack     import sys; print \"%s.%s.%s\" % sys.version_info[:3];
gyp ERR! stack                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (node:child_process:389:12)
gyp ERR! stack     at ChildProcess.emit (node:events:537:28)
gyp ERR! stack     at maybeClose (node:internal/child_process:1091:16)
gyp ERR! stack     at Socket.<anonymous> (node:internal/child_process:449:11)
gyp ERR! stack     at Socket.emit (node:events:537:28)
gyp ERR! stack     at Pipe.<anonymous> (node:net:747:14)
gyp ERR! System Darwin 21.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions