Gitpod: Can I use PyQt5 with GitPod?

Created on 29 Sep 2019  路  3Comments  路  Source: gitpod-io/gitpod

I try to use PyQt5 in this Repo.
https://github.com/hidehiro98/alife_book_src

But got this warning.

WARNING: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-gitpod'

This looks not an error, but nothing happened.

Is there a way to solve this?

question stale

Most helpful comment

Thank you so much @jankeromnes !
I tried it and got the same window. I'll try to display what I want to see.
I think almost there...

All 3 comments

Hi @hidehiro98, thank you for filing this issue. I believe that the warning is indeed not an error.

The reason that you don't see anything happening is that a graphical window is opened in the Virtual Desktop on port 6080.

When I opened https://github.com/hidehiro98/alife_book_src and tried these commands:

pip3 install pyglet pymunk vispy keras tensorflow pyqt5
cd chap02
python3 game_of_life.py

and also configured port 6080 to automatically open a preview:

ports:
  - port: 6080
    onOpen: open-preview

(But you can also Expose and Preview ports manually instead, directly from the bottom bar.)

I then was able to see the graphical PyQt5 window:

Screenshot 2019-09-30 at 12 40 30

(It didn't show anything that looked like a game of life, but probably that's a different issue.)

I'll send a Pull Request to your fork, with the changes that made it work for me.

Thank you so much @jankeromnes !
I tried it and got the same window. I'll try to display what I want to see.
I think almost there...

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kittaakos picture kittaakos  路  3Comments

kuniss picture kuniss  路  3Comments

PatMyron picture PatMyron  路  3Comments

akosyakov picture akosyakov  路  3Comments

Kreyren picture Kreyren  路  3Comments