Run python scripts in Pynq Environment

  • PYNQ: 3.0.1
  • Board: ZCU216
  • Tool Version: 2022.2

Currently I am running my code inside a Jupyter notebook. But, in the end I want to have a python GUI that runs the scripts. Since I want to control the overlays through the GUI, I need to run the GUI in the Pynq environment, but apart from running inside the notebook, I am not sure how to do it. Is it even possible?

Thanks in advanced!

Hi @DiogoBaptista

There is three steps to running PYNQ code from the command line:

  1. Make sure you are in sudo privileges (e.g. sudo su)
  2. Source the pynq venv environment source /etc/profile.d/pynq_venv.sh
  3. Source the xrt environment source /etc/profile.d/xrt_setup.sh

You should now be in the right environment to run PYNQ code.

You could put both source commands into a shell script which you can run whenever you want.

Thanks,

Josh

1 Like