Build failing on flask app with uWSGI

I have a flask app that uses uWSGI that used to work just fine but now keeps failing on build giving this error:

Sep 22 11:34:57 AM      Running setup.py install for uwsgi: started
Sep 22 11:35:20 AM      ERROR: Command errored out with exit status 1:
Sep 22 11:35:20 AM       command: /opt/render/project/src/.venv/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1h_dkgwx/uwsgi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1h_dkgwx/uwsgi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ug3j3y5u/install-record.txt --single-version-externally-managed --compile --install-headers /opt/render/project/src/.venv/include/site/python3.7/uwsgi
Sep 22 11:35:20 AM           cwd: /tmp/pip-install-1h_dkgwx/uwsgi/
...
Sep 22 11:35:20 AM      gcc: error: /opt/render/project/src/.venv/lib/python3.7/config-3.7m/libpython3.7.a: No such file or directory
Sep 22 11:35:20 AM      *** error linking uWSGI ***
Sep 22 11:35:20 AM      ----------------------------------------
Sep 22 11:35:20 AM  ERROR: Command errored out with exit status 1: /opt/render/project/src/.venv/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1h_dkgwx/uwsgi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1h_dkgwx/uwsgi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ug3j3y5u/install-record.txt --single-version-externally-managed --compile --install-headers /opt/render/project/src/.venv/include/site/python3.7/uwsgi Check the logs for full command output.
Sep 22 11:35:20 AM      Running setup.py install for uwsgi: finished with status 'error'

I even tried to undo the changes on the new commit and tried to deploy a version of the app that worked before but the same error keeps coming up on build. Would appreciate any help and feedback on this issue

Hi @aditeyashukla, welcome to the Render community!

After doing a lot of searching surrounding this error one thing I can think of is that pip install is using a version of uWSGI that is causing conflict. Can you try pinning the version in requirements.txt to a version that you used in the previous build?

Hi @tyler, thank you!

I tried specifying the version in the requirements.txt file that last worked (2.0.19.1), and it still gives the same error. I even tried using <=2 and the build still failed

install is using a version of uWSGI that is causing conflict.