我一直在编写一个电报机器人,我想将 python 代码部署到 heroku..我使用了 PyQt 的东西,而 heroku 显示了一些错误
2021-05-27T14:40:05.176156+00:00 heroku[web.1]: Starting process with command `python3 bot.py`
2021-05-27T14:40:20.221837+00:00 app[web.1]: Traceback (most recent call last):
2021-05-27T14:40:20.221858+00:00 app[web.1]: File "/app/bot.py", line 26, in <module>
2021-05-27T14:40:20.222079+00:00 app[web.1]: from PyQt5 import QtCore, QtGui
2021-05-27T14:40:20.222169+00:00 app[web.1]: ImportError: libGL.so.1: cannot open shared object file: No such file or directory
2021-05-27T14:40:20.606008+00:00 heroku[web.1]: Process exited with status 1
2021-05-27T14:40:20.772333+00:00 heroku[web.1]: State changed from starting to crashed
我在谷歌上搜索过,看到了很多解决方案,比如安装 opencv-python-headless 等等。但它们都不起作用。首先我尝试将 opencv 放在 requirements.txt 中,然后我尝试在 heroku 控制台中手动安装 pip。但他们都没有工作......我认为我的问题需要另一个准确的解决方案......任何看到这个的人请帮助我