node-word2vec icon indicating copy to clipboard operation
node-word2vec copied to clipboard

"Child process exited with code 126" error

Open bao153 opened this issue 4 years ago • 2 comments

When I ran: const w2v = require( 'word2vec' ); const corpusFilePath = 'cleared_words.txt';

w2v.word2vec(corpusFilePath, "vectors.txt", { size: 300 }, () => { console.log("DONE"); });

It returns: Child process exited with code 126 DONE

leaving vectors.txt unchanged. Is this because I'm running this on MacOS?

bao153 avatar May 12 '21 04:05 bao153

Hmm, not sure. Does the cleared_words.txt file exist in the directory from which you run the script? You might try supplying either an absolute or relative file path as in in the following example. Alternatively, I should be able to test it on MacOS by tomorrow.

Planeshifter avatar May 12 '21 05:05 Planeshifter

So it turned out that the executables in the /src directory didn't have execution permission but chmod +x-ing them didn't actually work either. Then, following https://stackoverflow.com/questions/64706647/why-am-i-getting-a-zsh-exec-format-error, I did make clean and make and it worked! Wonderful how the solution came from an answer not directly addressing "Child process exited with code 126" at all. Adding the commands to recompile source code on user's computer at installation would be really helpful. Thank you!

bao153 avatar May 14 '21 20:05 bao153