2017-09-28 6 views
0

Dans mon ancienne version d'étoiles filantes, j'ai pu installer le package swisseph de NodeJS avec:Obtenir une mauvaise version python lorsque vous essayez d'installer le paquet nodejs avec Meteor

npm install swisseph 

Mais à ce moment-là que je devais utiliser

var swisseph = Meteor.npmRequire('swisseph'); 

qui est de

https://github.com/meteorhacks/npm 

maintenant, je lis que Meteorhacks n'est plus n cédé. Mon problème maintenant est que mon application dépend de l'utilisation du paquetage swisseph NODEjs mais je suis maintenant incapable de l'installer.

Je reçois les erreurs suivantes:

npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue 
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue 

[email protected] install /Users/bliss/Documents/Coder/ReactMeteor/react-vedic/node_modules/swisseph 
node-gyp rebuild 

gyp ERR! configure error 
gyp ERR! Error: Python executable "/Users/bliss/anaconda/bin/python" is v3.6.1, which is not supported by gyp. 
gyp ERR! You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0. 
gyp ERR!  at PythonFinder.failPythonVersion (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:492:19) 
gyp ERR!  at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:474:14) 
gyp ERR!  at ChildProcess.exithandler (child_process.js:262:7) 
gyp ERR!  at emitTwo (events.js:125:13) 
gyp ERR!  at ChildProcess.emit (events.js:213:7) 
gyp ERR!  at maybeClose (internal/child_process.js:897:16) 
gyp ERR!  at Socket.stream.socket.on (internal/child_process.js:340:11) gyp ERR!  at emitOne (events.js:115:13) 
gyp ERR!  at Socket.emit (events.js:210:7) 
gyp ERR!  at Pipe._handle.close [as _onclose] (net.js:548:12) 
gyp ERR! System Darwin 16.6.0 
gyp ERR! command "/usr/local/Cellar/node/8.1.2/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /Users/bliss/Documents/Coder/ReactMeteor/react-vedic/node_modules/swisseph 
gyp ERR! node -v v8.1.2 
gyp ERR! node-gyp -v v3.6.2 
gyp ERR! not ok 
npm ERR! code ELIFECYCLE 
npm ERR! errno 1 
npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script. 
npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 

Comment puis-je utiliser ce package de noeud, même si elle est seulement du côté du serveur?

+0

De l'erreur, il est clair que vous devez pointer vers la version correcte de 'Python'. – Styx

Répondre

-1

La version python sur mon ordinateur était plus haute que la version python nécessaire pour l'installer correctement. J'ai pu résoudre ce problème en spécifiant explicitement la version de Python à utiliser par npm install:

npm --python=python2.7 install swisseph 
+0

Cela devrait être une modification à la question, pas la "réponse". – Styx