PythonShellError:ModuleNotFoundError:没有名为';熊猫';
我已经安装了pandas,但是在尝试使用pythonshell从nodejs运行python脚本时,它仍然没有显示任何模块PythonShellError:ModuleNotFoundError:没有名为';熊猫';,python,node.js,Python,Node.js,我已经安装了pandas,但是在尝试使用pythonshell从nodejs运行python脚本时,它仍然没有显示任何模块 const route = require('express').Router(); const { ensureAuthenticated, forwardAuthenticated } = require('../config/auth'); const { PythonShell } = require('python-shell'); const path = re
const route = require('express').Router();
const { ensureAuthenticated, forwardAuthenticated } = require('../config/auth');
const { PythonShell } = require('python-shell');
const path = require('path');
route.post('/report', (req, res) => {
var myPythonScriptPath = path.join(__dirname + '/report_gen.py');
var pyshell = new PythonShell(myPythonScriptPath);
var message = req.body.zone;
pyshell.on('message', function (message) {
res.send({ msg: message });
});
});
在代码的开头需要这一行
import pandas as pd
您是否在nodejs使用的python环境中安装了pandas?