Overlay package import in user python environment needs root


I am using pynq v2.4 image and pynq-networking overlay to process ethernet data directly to PL via the PS overlay.

I have installed the overlay in a python environment on the pynq-z2 board, and when I import it in python3.7 in env environment I get the error below:

If I try sudo python and then try to import the overlay package, it goes to the root python package, which does not have the overlay installed in it. There are lot of built issues in making the overlay work on the root python3.6.5.

Is there a way to solve the OS Error issue that the overlay import is causing?

(It can be this issue or it can be something else that I am completely missing, something related to gpio access or mmio access that the traceback printed.)

You need
sudo python3



sudo python3

goes to a different python version on which the overlay is not installed. Trying to install the overlay on the root python version was pain and unsuccessful.

sudo ./env/bin/python

solved the issue. I am able to access a virtual environment python while maintaining sudo privileges on the board.