Invalid syntax error installing node-gyp 11.4.2 on python 3.6.8
Open
Nobody has claimed this yet.
Python
- Dominant language
- Python
- Stars
- 10.7k
- Forks
- 1.9k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 5
Description
Please see log output below (repo path replaced with '...') . Is this using invalid syntax for Python 3.6.8? Note I am not able to control what version of Python is running in the build environment.
npm error gyp info using node-gyp@11.4.2
npm error gyp info using node@20.19.5 | linux | x64
npm error gyp info find Python using Python version 3.6.8 found at "/bin/python3"
npm error gyp http GET https://nodejs.org/download/release/v20.19.5/node-v20.19.5-headers.tar.gz
npm error gyp http 200 https://nodejs.org/download/release/v20.19.5/node-v20.19.5-headers.tar.gz
npm error gyp http GET https://nodejs.org/download/release/v20.19.5/SHASUMS256.txt
npm error gyp http 200 https://nodejs.org/download/release/v20.19.5/SHASUMS256.txt
npm error gyp info spawn /bin/python3
npm error gyp info spawn args [
npm error gyp info spawn args '/actions-runner/_work/.../node_modules/node-gyp/gyp/gyp_main.py',
npm error gyp info spawn args 'binding.gyp',
npm error gyp info spawn args '-f',
npm error gyp info spawn args 'make',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/actions-runner/_work/.../node_modules/re2/build/config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/actions-runner/_work/.../node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/root/.cache/node-gyp/20.19.5/include/node/common.gypi',
npm error gyp info spawn args '-Dlibrary=shared_library',
npm error gyp info spawn args '-Dvisibility=default',
npm error gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/20.19.5',
npm error gyp info spawn args '-Dnode_gyp_dir=/actions-runner/_work/.../node_modules/node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/20.19.5/<(target_arch)/node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=/actions-runner/_work/.../node_modules/re2',
npm error gyp info spawn args '-Dnode_engine=v8',
npm error gyp info spawn args '--depth=.',
npm error gyp info spawn args '--no-parallel',
npm error gyp info spawn args '--generator-output',
npm error gyp info spawn args 'build',
npm error gyp info spawn args '-Goutput_dir=.'
npm error gyp info spawn args ]
npm error Traceback (most recent call last):
npm error File "/actions-runner/_work/.../node_modules/node-gyp/gyp/gyp_main.py", line 42, in <module>
npm error import gyp # noqa: E402
npm error File "/actions-runner/_work/.../node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 211
npm error if flags := os.environ.get(env_name) or []:
npm error ^
npm error SyntaxError: invalid syntax
npm error gyp ERR! configure error
npm error gyp ERR! stack Error: `gyp` failed with exit code: 1
npm error gyp ERR! stack at ChildProcess.<anonymous> (/actions-runner/_work/.../node_modules/node-gyp/lib/configure.js:317:18)
npm error gyp ERR! stack at ChildProcess.emit (node:events:524:28)
npm error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm error gyp ERR! System Linux 4.18.0-553.75.1.el8_10.x86_64
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with gyp/pylib/gyp/init.py at line 211 and gyp/gyp_main.py, using the reported node-gyp 11.4.2 installation and Python 3.6.8 environment. Reproduce the failure and check the project's supported Python versions and compatibility tests. Done means the supported-version behavior is clear and Python 3.6.8 is either handled or explicitly rejected with appropriate coverage or documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100