Python script error after PYNQ Z2 upgraded from V2.6 to V3.0

Hi,

I have python script running OK on PYNQ Z2 with image V2.6, but have encountered error when the board was upgraded to image version 3.0.1. The error is "ModuleNotFoundError: No module named ‘pynq’, when trying from pynq import Overlay in the script. Same error happened to image V2.7. It seems being a compatibility issue.

Please advise how to resolve this problem. Thanks.

@Luke2020

Need more info on the upgrade you had done, reimage the SD card?
While can Jupyter notebook terminal python import pynq return normal?

These two elements should have a good start to us what is going on.

Enjoy

@Luke2020 Are you sure you using the right python interpreter on the 3.0.1 version?
As @briansune more details would be very useful

Hi @Luke2020,

Are you running the script in the terminal? Since v2.7 we have been using a python virtual environment which you might need to activate. Can you try sourcing the following in your terminal before running your script?

source /etc/profile.d/pynq_venv.sh

If that doesn’t solve it we probably need a bit more info, as @briansune and @giop98 said :slight_smile:

All the best,
Shane

1 Like