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

Can't install on systems where python = python3 #112

Closed
brandoncurtis opened this issue Jul 9, 2019 · 2 comments
Closed

Can't install on systems where python = python3 #112

brandoncurtis opened this issue Jul 9, 2019 · 2 comments

Comments

@brandoncurtis
Copy link

Installation fails on machines where python=python3 because of node-gyp's lack of support for python3 nodejs/node-gyp#1687

~/repos/esplora$ npm install                                                                                                                                                                                                                                     
                                                                                                                                 
> esplora@0.1.0 postinstall /home/brandon/repos/esplora
> (cd client && npm install) && (cd prerender-server && npm install)
           
                        
> canvas@1.6.13 install /home/brandon/repos/esplora/client/node_modules/canvas                                    
> node-gyp rebuild                                
                              
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /usr/bin/python -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 Socket.stream.socket.on (internal/child_process.js:336: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:561:12)                                        
gyp ERR! System Linux 4.14.87-1-ARCH                                                                   
gyp ERR! command "/home/brandon/.nvm/versions/node/v8.14.0/bin/node" "/home/brandon/.nvm/versions/node/v8.14.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/brandon/repos/esplora/client/node_modules/canvas
gyp ERR! node -v v8.14.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN esplora-client@0.1.0 No description
npm WARN esplora-client@0.1.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! canvas@1.6.13 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the canvas@1.6.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!     /home/brandon/.npm/_logs/2019-07-04T22_40_54_059Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! esplora@0.1.0 postinstall: `(cd client && npm install) && (cd prerender-server && npm install)`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the esplora@0.1.0 postinstall 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!     /home/brandon/.npm/_logs/2019-07-04T22_40_54_373Z-debug.log

Users on systems where python=python3 (e.g. Arch Linux) will have to install python2 (e.g. sudo pacman -S python2) and then alias python to python3 (e.g. alias python=python2) before running npm install.

@omajid
Copy link

omajid commented Aug 1, 2019

This is also starting to affect us in Fedora rawhide, where python is python3.

@shesek
Copy link
Collaborator

shesek commented Oct 14, 2019

The dependency on the canvas package was removed (it was a sub-dependency of qruri, which was replaced with qrcode in 73cd412 for this exact reason). There should be no other native modules that use node-gyp now, so I believe this should be resolved.

Closing for now, please report back if you're still having issues with the current master.

@shesek shesek closed this as completed Oct 14, 2019
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

3 participants