简体   繁体   中英

Error while installing linkedin-scraper module through Node.Js

I am a beginner in node.js. I have installed Node.js and I am installing a module named " linkedin-scraper" by using the command

" npm install linkedin-scraper"

I am having the following error. I also have installed Anaconda 3 and Anaconda2 and using python through that.

     gyp ERR! configure error
 gyp ERR! stack Error: Python executable 
 "C:\ProgramData\Anaconda3\python.EXE" is
 v3.6.1, 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 (C:\Program  
 Files\nodejs\node_modules\np
 m\node_modules\node-gyp\lib\configure.js:454:14)
gyp ERR! stack     at C:\Program 
Files\nodejs\node_modules\npm\node_modules\node
-gyp\lib\configure.js:443:9
 gyp ERR! stack     at ChildProcess.exithandler (child_process.js:195:7)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at maybeClose (internal/child_process.js:891:16)
gyp ERR! stack     at Socket.<anonymous> (internal/child_process.js:342:11)
gyp ERR! stack     at emitOne (events.js:96:13)
gyp ERR! stack     at Socket.emit (events.js:188:7)
gyp ERR! stack     at Pipe._handle.close [as _onclose] (net.js:497:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program 
Files\\nodej
s\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\w7\node_modules\contextify
gyp ERR! node -v v6.11.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open ' 
C:\Users\w7\package.jso
n'npm WARN w7 No description
npm WARN w7 No repository field.
npm WARN w7 No README data
npm WARN w7 No license field.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program 
Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "i" "linkedin-scraper"
npm ERR! node v6.11.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! contextify@0.1.15 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify@0.1.15 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the contextify 
package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project 
with:
npm ERR!     npm bugs contextify
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls contextify
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\w7\npm-debug.log

"C:\\ProgramData\\Anaconda3\\python.EXE" is v3.6.1, 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.

It seems like linkedin-scraper doen't support python 3+. Try to install python greater than 2.5 or less than 3.0

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM