I'm very new to the GCP as a whole, and I need to deploy a Flask app for a project with a client. Deploying an app is simple enough given all of the docs Google has provided, and since using the flexible app engine seems like the easiest way to do it, that's what I'm trying to use.
The issue I'm having though is in trying to connect to an MSSQL database that was setup on a Compute Engine. So far, I've connected to the database locally using pyodbc with some help from Connect to MSSQL Database using Flask-SQLAlchemy.
I was certain running gcloud app deploy would not work, and sure enough it wasn't able to install the pyodbc module. I figured that that wouldn't be the way to go anyway, and based on this page of the docs, it seems like I should be able to connect to the compute engine via its internal IP address.
I don't know how to proceed from here though, because everything in the docs wants me to use a Cloud SQL instance, but given that this data was provided by a client and I'm working on their GCP project, I'm a bit limited to the scenario I've described above.
src/pyodbc.h:56:17: fatal error: sql.h: No such file or directory. So after some digging I found that runningsudo apt-get install unixodbc unixodbc-devshould fix the problem. I'm able to installpyodbcwhen I ssh in now, but it still fails when I rungcloud app deployfor some reason, and I'm not sure why.glcoud app deployends with:In file included from src/cnxninfo.cpp:7:0: src/pyodbc.h:56:17: fatal error: sql.h: No such file or directory compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1@J.LValtueña, thanks for sharing the link. I am already using a requirements.txt file and a virtual environment as specified though. Everything loads in properly without the pyodbc line in my requirements file, but the app does not run without it.