jansmolders86 / mediacenterjs

A HTML/CSS/Javascript (NodeJS) based Media center
http://mediacenterjs.com
1.29k stars 243 forks source link

NPM install fails on systems with python versions > 3.0 #221

Open schiegl opened 8 years ago

schiegl commented 8 years ago

The sqlite3 package expects the default version to be python 2 instead calling python2 directly. I had to manually change the default version in order to install that package. It's also possible to pass the desired version with --python but I didn't know how to do that as I am not familiar with npm.

kevin2r commented 8 years ago

My python version is 2.7.10 but node-gyp is failing to compile the sqlite3 package when I do a fresh "npm i" in the master branch. This only happens with sqlite3 v3.0.5, when I do a "npm i sqlite3" on a clean project, it installs the sqlite3 v3.1.4 and it works perfectly.

sachgits commented 8 years ago

anyone who know which python version to use please help

tracker1 commented 8 years ago

You need the latest Python 2.7.x or newer (less than 3.x), and you should have the Visual C++ 2015 Build Tools (custom install, check everything) installed in order to build binary modules.

Then you should set your msvs_version for npm/node

sachgits commented 8 years ago

anyone who know which python version to use please help. does not work with python2.7.9

tracker1 commented 8 years ago

All I've ever had to do is install python 2.7.x, and the VC++ build tools (or full VS) and set the msvs_version config to match.

Can you post the full error message you are getting?