Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Invalid syntax error installing node-gyp 11.4.2 on python 3.6.8

Aperta
#3,218 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
node.js, python
Ambito
build-system

Direzione di ricerca

Inizia da gyp/pylib/gyp/init.py alla riga 211 e gyp/gyp_main.py, utilizzando l’installazione node-gyp 11.4.2 e l’ambiente Python 3.6.8 segnalati. Riproduci il problema e verifica le versioni di Python supportate dal progetto e i test di compatibilità. Il lavoro è completato quando il comportamento per le versioni supportate è chiaro e Python 3.6.8 è gestito oppure rifiutato esplicitamente con una copertura o documentazione adeguata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Python

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
Lingua principale
Python
Stelle
10.7k
Fork
1.9k
Merge medio
1g 4h
PR unite (30g)
5

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nodejs/node-gyp

Tutte le issue di nodejs/node-gyp

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.