PYNQ: PYTHON PRODUCTIVITY

Problem using pygame in jupyter notebook

Hi,

I am trying to use Pygame to build a demo for my homework, however there is no screen pop up in jupyter notebook.

The cell is runing but no screen pop up.

I have tried serval method, including

  • install a GUI in pynq
  • using X11 forward

none of them have worked.

Interesting enough, when I use SSH login into the linux system, open jupyter notebook in there and run the cell. I get the screen, but I have no perssiom to download overlay into PL. But when I open jupyter notebook in my laptop, I can download overlay, but no screen pop up.So I am in a dilemma.

Thanks,
Jilin Zhang

What board, what setup are you using? Does “No screen pop up” mean you expected something to show on screen but nothing happened? Any message from the cell?

Can you paste your cell?

My board originally is a zynq board(xc7z020clg400-2). I have download a PYNQ image into it. It works great other than the pygame problem.

When I run the code in Spyder at my laptop, a screen pop up. I am expected to see the same in the jupyter notebook. However, the cell just keeps runing without any message and screen.

*ps: I have also tried the method described in (https://www.hackster.io/adam-taylor/pynq-prize-wheel-73f077). Still no luck. Also, Thanks for your reply :smiley: *

Ele_Test0.py (4.9 KB)

Have you tried: https://github.com/cyberbeast/phantom-mime/wiki/Instructions-to-run-Pygame-Applications-on-Local-Remote-Machines

Sometimes it might be the X11 forwarding is not working properly. For the ‘dilemma’ you mentioned, the overlay downloading requires root privilege. So if you just ssh as a normal user and open jupyter, you won’t have permission. I still think you should do pygame calls from the default jupyter in PYNQ.