Open yovanoc opened 3 years ago
I am running into the same issue.
@yovanoc are you running this on an M1 mac by chance? Not sure if it's related -just spitballing.
No i9
@yovanoc Do you have python 3.x or 2.x installed on your system?
After a bit of digging I found out things may not build/install properly when using 3.x. (which I am using)
I will try rebuilding with python 2.7 and report back at some point
Ok, I managed to fix this issue on my machine. For reference, I am using an M1 mac, but I was getting the same error as @yovanoc so I'm thinking it may work for i9 too.
Here's what I did:
1) Downgraded to python 2.7. I didn't want to remove my existing 3.x or change my global config, so I ended up installing pyenv
and running pyenv install 2.7.18
and then used pyenv local 2.7.18
in my project directory.
2) My build system is using webpack
, so I ran into some errors as it tried to build the tensorflow externals. I had to add the following to my main webpack config:
// webpack.main.config.js
const nodeExternals = require('webpack-node-externals');
// ...
module.exports = {
entry: "./src/index.js",
// ...
externals: [nodeExternals()],
};
Since I am using a monorepo I had to add the local namespace to the allow list:
nodeExternals({
allowlist: [/^@example/]
}),
Reference: https://github.com/tensorflow/tfjs/tree/master/tfjs-node#windows--mac-os-x-requires-python-27
Hello I search for a solution but I don't find why is not working with tfjs, thanks