yorkie/tensorflow-nodejs

Could not locate the bindings file

skyonamine opened this issue · 6 comments

I'm running in WIndows 10, but show me this error below

Error: Could not locate the bindings file. Tried:
→ \node_modules\tensorflow2\build\tensorflow.node
→ \node_modules\tensorflow2\build\Debug\tensorflow.node
→ \node_modules\tensorflow2\build\Release\tensorflow.node
→ \node_modules\tensorflow2\out\Debug\tensorflow.node
→ \node_modules\tensorflow2\Debug\tensorflow.node
→ \node_modules\tensorflow2\out\Release\tensorflow.node
→ \node_modules\tensorflow2\Release\tensorflow.node
→ \node_modules\tensorflow2\build\default\tensorflow.node
→ \node_modules\tensorflow2\compiled\8.6.0\win32\x64\tensorflow.node

Any idea to solve my problem?

What's the installation log on node-tensorflow?

BTW, @skyonamine I have fixed the windows installation problem at #26, could you please re-install and try again?

It seems that error:

2096 silly extract fsevents@1.1.2
2097 silly extract tensorflow2@1.0.22
2098 silly doReverseSerial unbuild 1380
2099 silly unbuild tensorflow2@1.0.22
2100 info lifecycle tensorflow2@1.0.22preuninstall: tensorflow2@1.0.22
2101 info lifecycle tensorflow2@1.0.22
uninstall: tensorflow2@1.0.22
2102 verbose unbuild rmStuff tensorflow2@1.0.22 from \api\node_modules
2103 info lifecycle tensorflow2@1.0.22~postuninstall: tensorflow2@1.0.22
2104 silly doSerial remove 1380

I'm trying to run command postInstall "node scripts/download.js && node-gyp rebuild"
but it shows me:

Skiped, tensorflow library and header are exists
Done, https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow_proto-1.2.1.zip is finished downloaded.
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@8.6.0 | win32 | x64
gyp ERR! configure error
gyp ERR! stack Error: Command failed: \AppData\Local\Programs\Python\Python36\python.EXE -c import platform; print(platform.python_version());
gyp ERR! stack Traceback (most recent call last):
gyp ERR! stack File "", line 1, in
gyp ERR! stack File "\AppData\Local\Programs\Python\Python36\lib\platform.py", line 116, in
gyp ERR! stack import sys, os, re, subprocess
gyp ERR! stack File "\AppData\Local\Programs\Python\Python36\lib\re.py", line 142, in
gyp ERR! stack class RegexFlag(enum.IntFlag):
gyp ERR! stack AttributeError: module 'enum' has no attribute 'IntFlag'
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:271:12)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at maybeClose (internal/child_process.js:927:16)
gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:348:11)
gyp ERR! stack at emitOne (events.js:115:13)
gyp ERR! stack at Socket.emit (events.js:210:7)
gyp ERR! stack at Pipe._handle.close [as _onclose] (net.js:547:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\Program Files\nodejs\node.exe" "\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd \node_modules\tensorflow2
gyp ERR! node -v v8.6.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

sorry, i saw your message after that i sent.
I'll try

Now, this error:

\node_modules\tensorflow2>node scripts/download.js && node-gyp rebuild
Done, https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow_proto-1.2.1.zip is finished downloaded.
https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-windows-x86_64-1.2.1.zip is finished downloaded.
events.js:182
throw er; // Unhandled 'error' event
^

Error: Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?
at Object.exports.decode (\node_modules\tar-stream\headers.js:270:43)
at Extract.onheader [as _onparse] (\node_modules\tar-stream\extract.js:120:39)
at Extract._write (\node_modules\tar-stream\extract.js:243:8)
at doWrite (\node_modules\readable-stream\lib_stream_writable.js:406:64)
at writeOrBuffer (\node_modules\readable-stream\lib_stream_writable.js:395:5)
at Extract.Writable.write (\node_modules\readable-stream\lib_stream_writable.js:322:11)
at Duplexify.ondata (\node_modules\readable-stream\lib_stream_readable.js:612:20)
at emitOne (events.js:115:13)
at Duplexify.emit (events.js:210:7)
at Duplexify.Readable.read (\node_modules\readable-stream\lib_stream_readable.js:462:26)

But, i did download this url and it worked

Invalid tar header for me too