Skip to content

invalid syntax error #324

Closed
Closed

Description

@gen4sp

cant install many things, reciving this
Valentin-Laps-MacBook-Pro:krotgame gen4$ npm install v8-profiler
npm WARN package.json dominator-game@0.0.1 No description
npm WARN package.json dominator-game@0.0.1 No repository field.
npm WARN package.json dominator-game@0.0.1 No README data
npm WARN package.json nunjucks@0.1.9 No repository field.
npm WARN package.json strong-agent@0.2.10 No repository field.
npm http GET https://registry.npmjs.org/v8-profiler
npm http 304 https://registry.npmjs.org/v8-profiler

v8-profiler@3.6.2-1 install /Users/gen4/Dropbox/krotgame/node_modules/v8-profiler
node-gyp rebuild

Traceback (most recent call last):
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp", line 15, in
import gyp
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 8, in
import gyp.input
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 852
except ImportError as e:
^
SyntaxError: invalid syntax
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:424:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Darwin 12.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/gen4/Dropbox/krotgame/node_modules/v8-profiler
gyp ERR! node -v v0.10.18
gyp ERR! node-gyp -v v0.10.9
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0

Activity

  1. gen4sp commented on Sep 6, 2013

    @gen4sp
    Author

    i recive error with trying to install:
    v8-profiler
    nodetime

  2. gen4sp commented on Sep 6, 2013

    @gen4sp
    Author

    webkit-devtools-agent too

  3. gen4sp commented on Sep 8, 2013

    @gen4sp
    Author

    solution: delete any other versions of python exept 2.7

  4. JayBeavers commented on Dec 10, 2013

    @JayBeavers
    Contributor

    Closing, will track this issue in #360.

  5. jayapannikkat commented on Dec 18, 2015

    @jayapannikkat

    Hi ,

    I am trying to install mean pakcge by running the below command:
    npm install -g mean-cli

    and I am getting the below error:

    kerberos@0.0.17 install /root/lib/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos
    (node-gyp rebuild) || (exit 0)

    gyp ERR! configure error
    gyp ERR! stack Error: Can't find Python executable "python2.7.10", you can set the PYTHON env variable.
    gyp ERR! stack at failNoPython (/root/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:116:14)
    gyp ERR! stack at /root/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:49:11
    gyp ERR! stack at F (/root/lib/node_modules/npm/node_modules/which/which.js:73:25)
    gyp ERR! stack at E (/root/lib/node_modules/npm/node_modules/which/which.js:76:29)
    gyp ERR! stack at /root/lib/node_modules/npm/node_modules/which/which.js:84:16
    gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15)
    gyp ERR! System Linux 2.6.18-194.8.1.el5
    gyp ERR! command "/root/bin/node" "/root/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /root/lib/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos
    gyp ERR! node -v v4.2.1
    gyp ERR! node-gyp -v v3.0.3
    gyp ERR! not ok

    I had python version 2.4 . Uninstalled it and installed version 2.7.10.

    Could you please help in resolving the issue with python and node_modules build error?

    Thanks,
    Jaya

  6. bnoordhuis commented on Dec 18, 2015

    @bnoordhuis
    Member

    gyp ERR! stack Error: Can't find Python executable "python2.7.10", you can set the PYTHON env variable.

    Have you tried setting export PYTHON=/absolute/path/to/python2.7.10?

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

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