I have installed a package using pip
on my Ubuntu 18.04 server.
When I go into the terminal and type the following, everything works fine :
$ python
>>> import <package-name>
I am able to use the package functions etc.
But when I do it through the const PythonShell = require('python-shell');
utility in Node.Js
, I get ModuleNotFoundError: No module named '<package-name>'
(the import <package-name>
code is the only thing in the python file I am running using the python shell in node.js)
What could explain that difference of treatment ?