【发布时间】:2018-12-13 23:14:17
【问题描述】:
我正在尝试使用 python3 调用我的 Python 脚本。该脚本使用安装了 pip3 的第三方库 webuntis。
python 脚本在命令行上完美运行,因此没有错误。
我的 Javascript 代码: const python = require('python-shell').PythonShell
python.run('./app/api/webuntis.py', {
mode: "json",
pythonPath: "/usr/bin/python3",
}, (err, results) => {
console.log(err)
console.log(results);
})
【问题讨论】:
标签: javascript python node.js python-3.x