question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Windows nodejs installation seems to be missing python...

See original GitHub issue

TensorFlow.js version

0.13.2

Browser version

Nodejs 0.1.17

Describe the problem or feature request

As described in docs I tried to install

npm install @tensorflow/tfjs-node
C:\xxxxxx\models>npm install @tensorflow/tfjs-node

> @tensorflow/tfjs-node@0.1.17 install C:\xxxxxx\models\node_modules\@tensorflow\tfjs-node
> node scripts/install.js

* Downloading libtensorflow
[==============================] 1002429/bps 100% 0.0s
* Building TensorFlow Node.js bindings
C:\xxxxxx\models\node_modules\@tensorflow\tfjs-node\scripts\install.js:154
      throw new Error('node-gyp rebuild failed with: ' + err);
      ^

Error: node-gyp rebuild failed with: Error: Command failed: node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.

I was specting some sort of wrapper over the tensorflow binaries not having yo use python at all. So, if python its needed instructions to install Node are not in shape.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
DavidGOrtegacommented, Oct 3, 2018

@nkreeger thanks for the support.

Here is my experience. using npm install --global --production windows-build-tools I ended up in a unfinished waiting for ever installation, despite that I run the CMD with administrator privileges. I have seen that bug also in that repo, mainly because you had python installed and other issues.

WHAT worked for me was installing Visual Studio 2017 and RUN

npm config set msvs_version 2017

I even had 2017 installed on my machine but it did not work until I run the npm command.

2reactions
nkreegercommented, Oct 2, 2018

Try running this:

npm install --global --production windows-build-tools

Or manually installing MSVC as detailed in the README on node-gyp: https://github.com/nodejs/node-gyp

The .sln file is generated by node-gyp.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Running Python on Windows for Node.js dependencies
If you haven't got python installed along with all the node-gyp dependencies, simply open Powershell or Git Bash with administrator privileges and execute:...
Read more >
A Comprehensive Guide to Fixing Node-Gyp Issues on Windows
1. Try running npm install with the --no-optional flag. · 2. Try downloading the windows-build-tools package. · 3. Download the Visual Studio 2015 ......
Read more >
node-gyp - npm
On Windows. Install the current version of Python from the Microsoft Store package. Install tools and configuration manually: Install Visual C++ ...
Read more >
Set up Node.js on WSL 2 - Windows - Microsoft Learn
We recommend updating your Linux distribution regularly, including immediately after you install, to ensure you have the most recent packages.
Read more >
5 Ways to install Node.js
It seems quite obvious that people in my network, mostly fellow software engineers, prefer to use version managers such as nvm or n...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found