Call Python scripts from JavaScript

I’m running a Discord bot here on Glitch and in the near future, I want to release another update. This includes image manipulation and I chose Pythons PIL library for it since it’s the most efficient and easy to use for this. I use the PythonShell npm module to communicate with the Python scripts out of my main.js. Now my question is: Is this possible? I’ve already read similar threads and these said it is possible to run both (js and Python), but in my case, I need to install the PIL/pillow library and have a requirements.txt. Is this a problem or do I just install the things specified in my requirements.txt and let the bot run?

Try to use jimp instead, it can do most image manipulation i can think of.

That should be your case

1 Like

I already use this module, my question was if there can occur a problem with the addition of external python libraries

Why there should be? Python installs its own libs to a different directory than Node.JS does.