Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPM install error #15

Closed
murphman300 opened this issue Jun 18, 2019 · 1 comment
Closed

NPM install error #15

murphman300 opened this issue Jun 18, 2019 · 1 comment

Comments

@murphman300
Copy link

Trying to re-install your package produced this error as of 30 minutes ago.

OS: Windows 10 Enterprise, v. 1803.

gyp ERR! configure error
gyp ERR! stack Error: Command failed: 
C:\Users\{NAME}\AppData\Local\Programs\Python\Python37-32\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:294:12)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:970:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe"          
"C:\\Users\\{NAME}\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "build"
gyp ERR! cwd C:\Users\{NAME}\AppData\Roaming\npm\node_modules\odbc
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! odbc@2.0.0-3 install: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the odbc@2.0.0-3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Any feedback on this bug would be highly appreciated!

@markdirish
Copy link
Contributor

For whatever reason, node-gyp uses Python 2. This is a node-gyp issue, your node-gyp is finding Python 3. You will somehow need to set it to point to a Python2 python.exe (I think you set your PYTHON environment variable).

See this issue at node-gyp: nodejs/node-gyp#1528

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants