python.exe Syntax issue - NPM





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







1















I am having trouble when running Npm install. I get the following error:



gyp ERR! stack Error: Command failed: C:UsersuserxxxAppDataLocalProgramsPythonPython37-32python.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:276:12)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at maybeClose (internal/child_process.js:915:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"


I have added to my Path system variable the following:



C:Python27


In my user Path variable I have the following for Python:



C:UsersuserxxxAppDataLocalProgramsPythonPython37-32Scripts
C:UsersuserxxxAppDataLocalProgramsPythonPython37-32
C:UsersuserxxxAppDataLocalProgramsPythonPython37Scripts
C:UsersuserxxxAppDataLocalProgramsPythonPython37


Not sure what is going on here so any help appreciated!










share|improve this question





























    1















    I am having trouble when running Npm install. I get the following error:



    gyp ERR! stack Error: Command failed: C:UsersuserxxxAppDataLocalProgramsPythonPython37-32python.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:276:12)
    gyp ERR! stack at emitTwo (events.js:126:13)
    gyp ERR! stack at ChildProcess.emit (events.js:214:7)
    gyp ERR! stack at maybeClose (internal/child_process.js:915:16)
    gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
    gyp ERR! System Windows_NT 10.0.17134
    gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"


    I have added to my Path system variable the following:



    C:Python27


    In my user Path variable I have the following for Python:



    C:UsersuserxxxAppDataLocalProgramsPythonPython37-32Scripts
    C:UsersuserxxxAppDataLocalProgramsPythonPython37-32
    C:UsersuserxxxAppDataLocalProgramsPythonPython37Scripts
    C:UsersuserxxxAppDataLocalProgramsPythonPython37


    Not sure what is going on here so any help appreciated!










    share|improve this question

























      1












      1








      1








      I am having trouble when running Npm install. I get the following error:



      gyp ERR! stack Error: Command failed: C:UsersuserxxxAppDataLocalProgramsPythonPython37-32python.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:276:12)
      gyp ERR! stack at emitTwo (events.js:126:13)
      gyp ERR! stack at ChildProcess.emit (events.js:214:7)
      gyp ERR! stack at maybeClose (internal/child_process.js:915:16)
      gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
      gyp ERR! System Windows_NT 10.0.17134
      gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"


      I have added to my Path system variable the following:



      C:Python27


      In my user Path variable I have the following for Python:



      C:UsersuserxxxAppDataLocalProgramsPythonPython37-32Scripts
      C:UsersuserxxxAppDataLocalProgramsPythonPython37-32
      C:UsersuserxxxAppDataLocalProgramsPythonPython37Scripts
      C:UsersuserxxxAppDataLocalProgramsPythonPython37


      Not sure what is going on here so any help appreciated!










      share|improve this question














      I am having trouble when running Npm install. I get the following error:



      gyp ERR! stack Error: Command failed: C:UsersuserxxxAppDataLocalProgramsPythonPython37-32python.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:276:12)
      gyp ERR! stack at emitTwo (events.js:126:13)
      gyp ERR! stack at ChildProcess.emit (events.js:214:7)
      gyp ERR! stack at maybeClose (internal/child_process.js:915:16)
      gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
      gyp ERR! System Windows_NT 10.0.17134
      gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"


      I have added to my Path system variable the following:



      C:Python27


      In my user Path variable I have the following for Python:



      C:UsersuserxxxAppDataLocalProgramsPythonPython37-32Scripts
      C:UsersuserxxxAppDataLocalProgramsPythonPython37-32
      C:UsersuserxxxAppDataLocalProgramsPythonPython37Scripts
      C:UsersuserxxxAppDataLocalProgramsPythonPython37


      Not sure what is going on here so any help appreciated!







      python npm-install






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 16 '18 at 13:12









      M guyM guy

      1197




      1197
























          1 Answer
          1






          active

          oldest

          votes


















          1














          The command you are attempting to run uses Python 2 syntax. Attempting to run it with Python 3.7 correctly produces a syntax error.



          Either upgrade the script to Python 3 (about time already), or fix the execution path so that it can be run with the obsolescent Python version.






          share|improve this answer
























          • Upstream bug: github.com/nodejs/node-gyp/issues/360 (closed)

            – tripleee
            Nov 16 '18 at 13:29












          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53338620%2fpython-exe-syntax-issue-npm%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          The command you are attempting to run uses Python 2 syntax. Attempting to run it with Python 3.7 correctly produces a syntax error.



          Either upgrade the script to Python 3 (about time already), or fix the execution path so that it can be run with the obsolescent Python version.






          share|improve this answer
























          • Upstream bug: github.com/nodejs/node-gyp/issues/360 (closed)

            – tripleee
            Nov 16 '18 at 13:29
















          1














          The command you are attempting to run uses Python 2 syntax. Attempting to run it with Python 3.7 correctly produces a syntax error.



          Either upgrade the script to Python 3 (about time already), or fix the execution path so that it can be run with the obsolescent Python version.






          share|improve this answer
























          • Upstream bug: github.com/nodejs/node-gyp/issues/360 (closed)

            – tripleee
            Nov 16 '18 at 13:29














          1












          1








          1







          The command you are attempting to run uses Python 2 syntax. Attempting to run it with Python 3.7 correctly produces a syntax error.



          Either upgrade the script to Python 3 (about time already), or fix the execution path so that it can be run with the obsolescent Python version.






          share|improve this answer













          The command you are attempting to run uses Python 2 syntax. Attempting to run it with Python 3.7 correctly produces a syntax error.



          Either upgrade the script to Python 3 (about time already), or fix the execution path so that it can be run with the obsolescent Python version.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 16 '18 at 13:28









          tripleeetripleee

          96k13133190




          96k13133190













          • Upstream bug: github.com/nodejs/node-gyp/issues/360 (closed)

            – tripleee
            Nov 16 '18 at 13:29



















          • Upstream bug: github.com/nodejs/node-gyp/issues/360 (closed)

            – tripleee
            Nov 16 '18 at 13:29

















          Upstream bug: github.com/nodejs/node-gyp/issues/360 (closed)

          – tripleee
          Nov 16 '18 at 13:29





          Upstream bug: github.com/nodejs/node-gyp/issues/360 (closed)

          – tripleee
          Nov 16 '18 at 13:29




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53338620%2fpython-exe-syntax-issue-npm%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Xamarin.iOS Cant Deploy on Iphone

          Glorious Revolution

          Dulmage-Mendelsohn matrix decomposition in Python