ioquatix / script-runner

This package will run various script files inside of Atom. It currently supports JavaScript, CoffeeScript, Ruby, and Python. You can add more.
http://atom.io/packages/script-runner
Other
62 stars 23 forks source link

Install problem with new update #103

Closed ghoetker closed 3 years ago

ghoetker commented 5 years ago

In trying to update to version 2.5.0 within Atom on a Mac running 10.14.5, I encountered the following installation error.

node-pty@0.8.1 install /private/tmp/apm-install-dir-11966-2835-orh7vd.bvum7/node_modules/script-runner/node_modules/node-pty node scripts/install.js

gyp info it worked if it ends with ok gyp verb cli [ '/Applications/Atom.app/Contents/Resources/app/apm/bin/node', gyp verb cli '/Applications/Atom.app/Contents/Resources/app/apm/node_modules/.bin/node-gyp', gyp verb cli 'rebuild' ] gyp info using node-gyp@3.4.0 gyp info using node@8.9.3 | darwin | x64 gyp verb command rebuild [] gyp verb command clean [] gyp verb clean removing "build" directory gyp verb command configure [] gyp verb check python checking for Python executable "/Applications/Atom.app/Contents/Resources/app/apm/bin/python-interceptor.sh" in the PATH gyp verb which succeeded /Applications/Atom.app/Contents/Resources/app/apm/bin/python-interceptor.sh /Applications/Atom.app/Contents/Resources/app/apm/bin/python-interceptor.sh gyp verb check python version /Applications/Atom.app/Contents/Resources/app/apm/bin/python-interceptor.sh -c "import platform; print(platform.python_version());" returned: "3.7.3\n" gyp ERR! configure error gyp ERR! stack Error: Python executable "/Applications/Atom.app/Contents/Resources/app/apm/bin/python-interceptor.sh" is v3.7.3, which is not supported by gyp. gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0. gyp ERR! stack at failPythonVersion (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/lib/configure.js:454:14) gyp ERR! stack at /Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/lib/configure.js:443:9 gyp ERR! stack at ChildProcess.exithandler (child_process.js:267:7) 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:925:16) gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:346:11) gyp ERR! stack at emitOne (events.js:116:13) gyp ERR! stack at Socket.emit (events.js:211:7) gyp ERR! stack at Pipe._handle.close [as _onclose] (net.js:554:12) gyp ERR! System Darwin 18.6.0 gyp ERR! command "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/.bin/node-gyp" "rebuild" gyp ERR! cwd /private/tmp/apm-install-dir-11966-2835-orh7vd.bvum7/node_modules/script-runner/node_modules/node-pty gyp ERR! node -v v8.9.3 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok npm WARN enoent ENOENT: no such file or directory, open '/private/tmp/apm-install-dir-11966-2835-orh7vd.bvum7/package.json' npm WARN apm-install-dir-11966-2835-orh7vd.bvum7 No description npm WARN apm-install-dir-11966-2835-orh7vd.bvum7 No repository field. npm WARN apm-install-dir-11966-2835-orh7vd.bvum7 No README data npm WARN apm-install-dir-11966-2835-orh7vd.bvum7 No license field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-pty@0.8.1 install: node scripts/install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-pty@0.8.1 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/ghoetker/.atom/.apm/_logs/2019-07-06T02_07_27_611Z-debug.log

ioquatix commented 5 years ago

Try this:

ln -s `which python2.7` /Applications/Atom.app/Contents/Resources/app/apm/bin/python-interceptor.sh

Then reinstall.

ioquatix commented 5 years ago

This is an atom problem by the way: https://github.com/atom/atom/issues/15925

ioquatix commented 5 years ago

I've submitted a request upstream to try and sort this out. Maybe we should submit a PR to apm too.

alexhaislip commented 5 years ago

I am having the same problem

ioquatix commented 5 years ago

The only suggestion I can give you is the one above:

ln -s `which python2.7` /Applications/Atom.app/Contents/Resources/app/apm/bin/python-interceptor.sh

This forces atom to use python2.7 - otherwise it will use python3.x and this breaks it's own internal build system.

mrdc commented 4 years ago

@ioquatix

Will you be so kind to tell me how to fix it on Windows? Both Python 2.7 and 3 are installed. On mac it works fine.

ioquatix commented 4 years ago

Windows is unsupported at this time... too many problems with dependencies.

ioquatix commented 3 years ago

I feel like the latest release v2.6.0 should have fixed some of these issues because we bumped node-pty to 0.9.0 and node-gyp has also been updated to work with python3.