Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while pushing Flask app to heroku: Could not build wheels for PyGObject which use PEP 517 and cannot be installed directly

i am getting this error while pushing my Flask app to heroku: Could not build wheels for PyGObject which use PEP 517 and cannot be installed directly remote: Push rejected, failed to compile Python app. I've tried this command pip3 install --upgrade pip setuptools wheel as someone suggested in another question and then i tried to install PyGObject using pip3 install PyGObject but i says that requirements are already satisfied

Full Error

remote:        Failed to build dbus-python PyGObject
remote:        ERROR: Could not build wheels for PyGObject which use PEP 517 and cannot be installed directly
remote:  !     Push rejected, failed to compile Python app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to safe-meadow-87431.
remote: 
To https://git.heroku.com/safe-meadow-87431.git

Any help would be Appreciated. I am using Ubuntu 20.04 "focal-fossa" and python version 3.7.5

like image 841
vatsalay Avatar asked Nov 06 '22 05:11

vatsalay


1 Answers

I had the same issue when pushing my app to Heroku - it got stuck on Pandas. For me the solution was to adjust the python version in my runtime.txt

From python-3.9.2

to python-3.8.8

like image 91
Joris Avatar answered Nov 15 '22 06:11

Joris