I have a Flask app, and I'm trying to add a RESTful endpoint that uses rpy2 to load a model from a .rds file. When I run my test script with python3 testscript.py that contains import rpy2.robjects as objects, it works fine. However when I try the same import in a file on my flask app, and run it using FLASK_ENV=development flask run, I get the following error:
Fatal error: unable to initialize the JIT
I assume this has something to do with the Flask configuration and finding R, has anyone seen this before?