When the server has recently started and the Node app has recently started (specifically AWS Elastic Beanstalk new instance deployed)
When I call pd = await python('pandas');
I get an error like this: ModuleNotFoundError: No module named 'pandas']
This is despite there definitely being such a module, I am using the env variable PYTHON_BIN to set the path /usr/bin/python3.9
After some time, if I call this again it works.
So I have setup a recursive function that on app start, calls await python over and over again (with a pause) until it succeeds, it seems to take about 5 mins to work.
After that all works well.
When the server has recently started and the Node app has recently started (specifically AWS Elastic Beanstalk new instance deployed)
When I call
pd = await python('pandas');I get an error like this:
ModuleNotFoundError: No module named 'pandas']This is despite there definitely being such a module, I am using the env variable
PYTHON_BINto set the path/usr/bin/python3.9After some time, if I call this again it works.
So I have setup a recursive function that on app start, calls await python over and over again (with a pause) until it succeeds, it seems to take about 5 mins to work.
After that all works well.