问题描述
我在将Flask应用程序推送到heroku时遇到此错误:
无法为使用PEP 517且无法直接安装的PyGObject构建轮子
remote:推送被拒绝,无法编译Python应用。我曾尝试在另一个问题中建议使用此命令 pip3 install --upgrade pip setuptools wheel
,然后尝试使用PyGObject
安装pip3 install PyGObject
,但我说要求已经满足
完全错误
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
任何帮助将不胜感激。我正在使用Ubuntu 20.04 "focal-fossa"
和python version 3.7.5
解决方法
将我的应用程序推送到 Heroku 时遇到了同样的问题 - 它卡在 Pandas 上。对我来说,解决方案是在我的 runtime.txt 中调整 python 版本
来自python-3.9.2
到python-3.8.8