Reputation: 6592
I am needing to install sharp
for node.js https://github.com/lovell/sharp but it appears that one of its dependencies (libvips) needs python (and so installation fails as I don't have python on my system and don't expect I'll be able to use python in my production environment).
I read that on the sharp
github page it states "OS X, Windows (x64), Linux (x64, ARM) systems do not require the installation of any external runtime dependencies." so I'm not sure why I need python.
Upvotes: 2
Views: 3719
Reputation: 11
Using version 0.26.x
of sharp seems to fix the issue now and doesn't require Python to install.
From their changelogs:
Prebuilt libvips binaries are now statically-linked and Brotli-compressed, requiring Node.js 10.16.0+.
Upvotes: 1
Reputation: 2198
The sharp
package uses node-gyp, which is a tool for "compiling native addon modules for Node.js." Typically native means C or C++ libraries like libvips. Python 2.7 is required for node-gyp to work as explained in the install docs. Despite sharp
coming with prebuilt binaries, it still requires node-gyp (for now) as explained in this issue.
Upvotes: 3