有人使用过sharp这个包么?求教如何在windows下安装
发布于 8 年前 作者 FanTaSyLin 10582 次浏览 来自 问答

目标环境win10 home版 npm install sharp --save 以下是报错信息 ···

Standard error:
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 (D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:401:14)
gyp ERR! stack     at D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:356:11
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\workstation\FY-3D_Client\trunk\DataService\fy3dserver\node_modules\sharp
gyp ERR! node -v v4.3.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 
npm WARN application-name@0.0.1 No description
npm WARN application-name@0.0.1 No repository field.
npm WARN application-name@0.0.1 No license field.
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "sharp"
npm ERR! node v4.3.0
npm ERR! npm  v3.8.5
npm ERR! code ELIFECYCLE	
npm ERR! sharp@0.13.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sharp@0.13.1 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 sharp 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 sharp
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls sharp
npm ERR! There is likely additional logging output above.	
npm ERR! Please include the following file with any support request:
npm ERR!     D:\workstation\FY-3D_Client\trunk\DataService\fy3dserver\npm-debug.log

Standard output:

sharp@0.13.1 install D:\workstation\FY-3D_Client\trunk\DataService\fy3dserver\node_modules\sharp node-gyp rebuild

···

5 回复

npm node-gyp -v 输出 3.8.5

用vs的command line试试看?

Can’t find Python !!! 不够明显吗

@hanyuzhou2006 我装一个试试 你别说 光看下面了 还真没注意到

回到顶部