Please, I need your help!
I want to start a python3 script from a node.
For this I installed "node-red-contrib-pythonshell", works well with an easy script, but now i want to import "requests" modul and I always get this error:
exit code: 1, Traceback (most recent call last):
File "kodi-pause.py", line 3, in
import requests
ModuleNotFoundError: No module named 'requests'
And I really have no idea why?
I have created a virtual environment in the data directory of node-red and installed "request" in it. If I change to the environment from the console and start the script, its working fin, but not from the node.
I have no more ideas what to do and so every tip is welcome!
Thanks in front and have a nice weekend!
Mili
Yes, that is a part of what I want to do, but there are many more python scripts, that I have wrote and i want them integreted.
Kodi nodes will only be a workaround.
And I hate to program in Java and love Python!
And overall I want to understut why it don´t work.
While learning more & more about Node-RED & javascript, you can use the excellent EXEC node to start & run & recycle your existing Python script without problems. I have done this myself since years now. If you in addition need to exchange data between your Python scripts and Node-RED you can easily use MQTT. After some time you may even migrate some of your Python scripts and replace them with functionality provided by Node-RED. At least this is how I started to learn, coming from a pure Python and C++ environment