hileez / node-pyrunner

Nodejs call python native addon.
MIT License
36 stars 2 forks source link

windows10,提示找不到pyrunner.node模块 #6

Closed yushuohuanxiu closed 1 year ago

yushuohuanxiu commented 1 year ago

return process.dlopen(module, path.toNamespacedPath(filename)); ^

Error: The specified module could not be found. \?\c:\Users\moons\code\node-python-demo\node_modules\node-pyrunner\addons\3.10.10\win32\x64\pyrunner.node at Module._extensions..node (node:internal/modules/cjs/loader:1338:18) at Module.load (node:internal/modules/cjs/loader:1117:32) at Module._load (node:internal/modules/cjs/loader:958:12) at Module.require (node:internal/modules/cjs/loader:1141:19) at require (node:internal/modules/cjs/helpers:110:18) at new PyRunner (c:\Users\moons\code\node-python-demo\node_modules\node-pyrunner\index.js:49:23) at Object. (c:\Users\moons\code\node-python-demo\node_modules\node-pyrunner\index.js:140:18) at Module._compile (node:internal/modules/cjs/loader:1254:14) at Module._extensions..js (node:internal/modules/cjs/loader:1308:10) at Module.load (node:internal/modules/cjs/loader:1117:32) { code: 'ERR_DLOPEN_FAILED' }

yushuohuanxiu commented 1 year ago

实际c:\Users\moons\code\node-python-demo\node_modules\node-pyrunner\addons\3.10.10\win32\x64\pyrunner.node文件是存在的

hileez commented 1 year ago

没有看到你的源码,但应该是没能加载到解释器的动态链接库,请拷贝动态链接库到项目目录后再测试。Dynamic link library