Term2 and python2


#1

hello today I tried to install term2 but it failed so I looked at the output window and the error is that the package does not find python2 thing being normal because it seems to me that we have switched to the python3 version but I’m not sure
can you help me???

> pty.js@0.2.13 install C:\Users\tinou\AppData\Local\Temp\apm-install-dir-118925-6172-dms2sx.pns1j\node_modules\term2\node_modules\pty.js

node-gyp rebuild

C:\Users\tinou\AppData\Local\Temp\apm-install-dir-118925-6172-dms2sx.pns1j\node_modules\term2\node_modules\pty.js>if not defined npm_config_node_gyp (node “C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\…\node_modules\node-gyp\bin\node-gyp.js” rebuild ) else (node “C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\bin\…\node_modules\node-gyp\bin\node-gyp.js” rebuild )

gyp info it worked if it ends with ok
gyp verb cli [ ‘C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\bin\node.exe’,
gyp verb cli ‘C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\node-gyp\bin\node-gyp.js’,
gyp verb cli ‘rebuild’ ]
gyp info using node-gyp@3.4.0
gyp info using node@8.9.3 | win32 | 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 “python2” in the PATH
gyp verb which failed Error: not found: python2
gyp verb which failed at getNotFoundError (C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\which\which.js:13:12)
gyp verb which failed at F (C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\which\which.js:68:19)
gyp verb which failed at E (C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\which\which.js:80:29)
gyp verb which failed at C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\which\which.js:89:16
gyp verb which failed at C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\isexe\index.js:42:5
gyp verb which failed at C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\isexe\windows.js:36:5
gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb which failed python2 { Error: not found: python2
gyp verb which failed at getNotFoundError (C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\which\which.js:13:12)
gyp verb which failed at F (C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\which\which.js:68:19)
gyp verb which failed at E (C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\which\which.js:80:29)
gyp verb which failed at C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\which\which.js:89:16
gyp verb which failed at C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\isexe\index.js:42:5
gyp verb which failed at C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\isexe\windows.js:36:5
gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21) code: ‘ENOENT’ }
gyp verb check python checking for Python executable “python” in the PATH
gyp verb which failed Error: not found: python
gyp verb which failed at getNotFoundError (C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\which\which.js:13:12)
gyp verb which failed at F (C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\which\which.js:68:19)
gyp verb which failed at E (C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\which\which.js:80:29)
gyp verb which failed at C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\which\which.js:89:16
gyp verb which failed at C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\isexe\index.js:42:5
gyp verb which failed at C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\isexe\windows.js:36:5
gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb which failed python { Error: not found: python
gyp verb which failed at getNotFoundError (C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\which\which.js:13:12)
gyp verb which failed at F (C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\which\which.js:68:19)
gyp verb which failed at E (C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\which\which.js:80:29)
gyp verb which failed at C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\which\which.js:89:16
gyp verb which failed at C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\isexe\index.js:42:5
gyp verb which failed at C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\isexe\windows.js:36:5
gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21) code: ‘ENOENT’ }
gyp verb could not find “python”. checking python launcher
gyp verb could not find “python”. guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can’t find Python executable “python”, you can set the PYTHON env variable.
gyp ERR! stack at failNoPython (C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\node-gyp\lib\configure.js:449:14)
gyp ERR! stack at C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\node-gyp\lib\configure.js:404:11
gyp ERR! stack at C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command “C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\bin\node.exe” “C:\Users\tinou\AppData\Local\atom\app-1.32.0\resources\app\apm\node_modules\node-gyp\bin\node-gyp.js” “rebuild”
gyp ERR! cwd C:\Users\tinou\AppData\Local\Temp\apm-install-dir-118925-6172-dms2sx.pns1j\node_modules\term2\node_modules\pty.js
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 ‘C:\Users\tinou\AppData\Local\Temp\apm-install-dir-118925-6172-dms2sx.pns1j\package.json’
npm WARN apm-install-dir-118925-6172-dms2sx.pns1j No description
npm WARN apm-install-dir-118925-6172-dms2sx.pns1j No repository field.
npm WARN apm-install-dir-118925-6172-dms2sx.pns1j No README data
npm WARN apm-install-dir-118925-6172-dms2sx.pns1j No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pty.js@0.2.13 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pty.js@0.2.13 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! C:\Users\tinou.atom.apm_logs\2018-10-25T06_18_52_198Z-debug.log


#2

AFAIK, node-gyp only works with Python 2


#3

The error says that you don’t have Python installed. That package relies on the Node.js package node-gyp, which has some dependencies that are installed by default on most Linux and Mac machines, but not most Windows machines. Follow the instructions at that link and you should be able to install term2 and anything else that builds native code.