Skip to content

Add warning / error message when running in not-suitable python version #360

Closed

Description

@martinheidegger

#315
#324

are both bugs referring to node-gyp running in the wrong python version. This can removed stress by adding an error output stating which version of python at which path node-gyp uses.

Activity

  1. JayBeavers commented on Dec 6, 2013

    @JayBeavers
    Contributor

    Can you restate this as a pull request? :-)

  2. berleant commented on Nov 9, 2017

    @berleant

    Relatedly--it'd be awesome if node-gyp could use python 3.

  3. bnoordhuis commented on Nov 9, 2017

    @bnoordhuis
    Member

    Since node-gyp has been printing that warning for years now, I'll go ahead and close this out.

    @shoshber Unlikely to happen anytime soon.

  4. StoneCypher commented on Sep 21, 2018

    @StoneCypher

    i see no such warning message

    C:\Users\john\projects\(censored)\node_modules\integer>if not defined npm_config_node_gyp (node "C:\Users\john\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\john\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
    gyp ERR! configure error
    gyp ERR! stack Error: Command failed: C:\Users\john\Anaconda3\python.EXE -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: invalid syntax
    gyp ERR! stack
    gyp ERR! stack     at ChildProcess.exithandler (child_process.js:272:12)
    gyp ERR! stack     at ChildProcess.emit (events.js:160:13)
    gyp ERR! stack     at maybeClose (internal/child_process.js:943:16)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
    gyp ERR! System Windows_NT 10.0.17134
    gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\john\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
    gyp ERR! cwd C:\Users\john\projects\(censored)\node_modules\integer
    gyp ERR! node -v v9.4.0
    gyp ERR! node-gyp -v v3.8.0
    gyp ERR! not ok
    
  5. richardlau commented on Sep 21, 2018

    @richardlau
    Member

    @StoneCypher that will be fixed by #1534.

  6. northeusunshine commented on Apr 23, 2019

    @northeusunshine

    Dear all
    What's the reason for the error message which i also got when exec npm i ? Does it mean node-gpy can not work with python3?
    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions