Skip to content

Gyp dependency on Windows despite shipping precompiled binary #458

@SteveSanderson

Description

@SteveSanderson

Hi - I was hoping to be able to use sharp in some ASP.NET samples because it looked like it would install easily on Mac/Linux/Windows.

However, when installing via npm install --save sharp on a stock Windows 10 machine I'm getting the following 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 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-    gyp\lib\configure.js:401:14)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:356:11
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:117:15)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd myproject\node_modules\sharp
gyp ERR! node -v v6.2.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok

Of course, python isn't generally installed on typical Windows developer or production server machines, so this error is to be expected if gyp gets involved.

What I had been hoping is that your pre-bundling of the binary libvips would mean this situation didn't occur, and no external dependencies (such as python) would be needed.

Can you let me know if I'm understanding this correctly?

  • Is python really mandatory for installing this on Windows? If so it would be great if you would amend your docs to emphasise this, as it hugely influences which projects will be able to use sharp. People won't generally install python.
  • Is it possible that a python/gyp requirement could be eliminated in the case of Windows installs, since you just need to download the precompiled binary?

Thanks. And BTW everything else about sharp worked magnificently - the API is beautiful and the performance was a couple of orders of magnitude better than I was getting from jimp before.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions