Sharp: Requires python - but listed as having no external requirements/dependencies...

Created on 30 Jan 2018  路  5Comments  路  Source: lovell/sharp

npm install sharp --save

.............

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 PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder. (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.16299

question

All 5 comments

Hello, did you see http://sharp.pixelplumbing.com/en/stable/install/#prerequisites ?

When you say "listed as having no external requirements/dependencies" are you referring to the sentence about runtime dependencies in the README?

You may be interested in subscribing to #186 for updates about removing the install-time need for Python (and a C++11 compiler).

I think that listing prerequisites needed for npm install in the README.md (until #186 is resolved) would clear up misunderstandings about dependencies/runtime dependencies.

@xyleen #186 is landing soon and will provide an update to the installation docs - see https://github.com/lovell/sharp/commit/32fd71af44cc7a0c4a018851b6a9d7c87b3765f5#diff-64407d3e6d5ef382426bdfbcae040c6a

Python is an external runtime dependency. But you write:

"OS X, Windows (x64), Linux (x64, ARM) systems do not require the installation of any external runtime dependencies."

I ended up using jimp, which delivered what it promised; "with zero external or native dependencies".
https://github.com/oliver-moran/jimp

Don't get me wrong - your library is most likely positively fine - it just didn't meet what I was looking for; Zero dependency installation, small footprint.

@michael-fosgerau Thanks for the update.

I guess the confusion here is whether the act of running npm install to install dependencies is considered part of the "runtime" of those dependencies. Once node_modules is in place, running node your-script-that-uses-sharp.js does not require Python.

Luckily the work for #186 will make this distinction mostly moot as it expands the documentation around compiling from source vs using prebuilt binaries and, more importantly, removes the need for Python during npm install for most people.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Andresmag picture Andresmag  路  3Comments

henbenla picture henbenla  路  3Comments

vermin1337 picture vermin1337  路  3Comments

genifycom picture genifycom  路  3Comments

zilions picture zilions  路  3Comments