I’m currently developing a Node.js application on Render.com that utilizes a Python child process. This Python process has its own set of dependencies, which I’ve listed in a requirements.txt
file.
In the build process, I’ve included the command pip install -r requirements.txt
to install these Python dependencies. According to the logs, the installation appears to be successful. However, when the Node.js script reaches the part where it needs to use these Python libraries (e.g., regex), it throws an error indicating that it can’t find the installed libraries.
I initially suspected this might be a PATH issue. To address this, I tried adding export PATH=$PATH:/path/to/python/packages
to the build command, replacing /path/to/python/packages
with the actual installation location. Unfortunately, this didn’t solve the problem.
I’ve also tried using Poetry, as following the Django tutorial, however, it seems that the node environmnet does not have Poetry pre-installed.
I’m at a loss for how to proceed and would appreciate any guidance or suggestions. How can I ensure that my Python dependencies are correctly found and utilized in my Node.js application?