2 回答

TA貢獻1780條經(jīng)驗 獲得超4個贊
我對 Windows 10 上的 @tensorflow\tfjs-node 版本 @1.5.2 和 @1.7.4 有同樣的問題。節(jié)點版本 @12.18.3 LTS
Error: The specified module could not be found.
\\?\E:\hypothesis-manager\facerec\http-service\node_modules\@tensorflow\tfjs-node\lib\napi-v5\tfjs_binding.node
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1187:18)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (E:\hypothesis-manager\facerec\http-service\node_modules\@tensorflow\tfjs-node\dist\index.js:58:16)
當我們嘗試更新和安裝軟件包時會發(fā)生這種情況,并且某些依賴項沒有正確安裝。npm uninstall @tensorflow\tfjs-node如果您使用的是 npm,請嘗試。然后使用npm i @tensorflow\tfjs-node它安裝最新版本的 tensorflow 即可。或者,如果您只想在您的項目中運行特定版本的 tensorflow(在我的情況下是 @1.5.2),請嘗試以下評論中給出的方法。

TA貢獻1798條經(jīng)驗 獲得超7個贊
所以,我得到了解決上述問題的辦法,首先我必須設置蟒蛇V2作為默認的Python關于Python的檢查版本時,后來起=>我不得不在上面顯示該命令打開Windows電源外殼為管理員和類型 npm install -g windows-build-tools
它花了幾分鐘時間就完成了。我也安裝了@tensorflow/tfjs
,然后@tensorflow/tfjs-node"
在我的項目中安裝。這就是我解決我的問題的方法,我希望它將來也可以幫助其他人。
旁注 => Windows 上的某些節(jié)點版本存在張量流問題,例如我不得不從 v10.15.0 升級到 v10.16.3
“解決問題的積分歸 Github 上的 tensorflow/tfjs 團隊”
添加回答
舉報