0

I have a file scraper.py which imports QWebEnginePage.

When I deploy it on aws using eb deploy it cant start the application and quit with following error:

Traceback (most recent call last):
  File "/opt/python/current/app/application.py", line 6, in <module>
    from menu import kult_menuholder
  File "/opt/python/current/app/menu/kult_menuholder.py", line 2, in <module>
    import scraper
  File "/opt/python/current/app/scraper.py", line 82, in <module>
    from PyQt5.QtWebEngineWidgets import QWebEnginePage
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
mod_wsgi (pid=5845): Target WSGI script '/opt/python/current/app/application.py' cannot be loaded as Python module.
mod_wsgi (pid=5845): Exception occurred processing WSGI script '/opt/python/current/app/application.py

PyQt5 is installed by pip.

I cannot reproduce this locally on a windows machine. Help or any advices would be appreciated.

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Joker
  • 2,304
  • 25
  • 36
  • You have to install PyOpenGL, what is your OS? – eyllanesc May 27 '18 at 01:34
  • 1
    try with `pip3 install PyOpenGL` – eyllanesc May 27 '18 at 01:36
  • Thanks I will try. I am not sure which os it is. I suppose its a ubuntu machine. – Joker May 27 '18 at 01:38
  • @eyllanesc Just tested it... Still the same error – Joker May 27 '18 at 01:43
  • Your OS has a window manager or do you only access through SSH? QWebEnginePage needs access to a window system even if it is hidden. If you do not know what OS you have, it's hard to answer, can you also have permission to install packages on the system outside of the pip? – eyllanesc May 27 '18 at 01:45
  • I can only access it using elastic beanstalk cli. I figured it out. Its a Amazon Linux AMI. I am not sure if its provide any window system. I think I can install packages by yum through the deployment. – Joker May 27 '18 at 01:52
  • That I remember amazon does not offer any server with window manager, I hope this mistake. – eyllanesc May 27 '18 at 01:54
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/171849/discussion-between-joker-and-eyllanesc). – Joker May 27 '18 at 02:02
  • @Joker did you found any solution for this? – Yash Oct 03 '20 at 07:18
  • @yashthakkar1173 sadly not. I ended up not using qt5 in the end. – Joker Oct 05 '20 at 07:15

0 Answers0