Closed dj-park closed 2 years ago
Hi,
Xlnx for PYNQ v2.7 has been deprecated. This is not unique to Ultra96. If you must use that feature, please use an earlier version of PYNQ.
Please see here for more info: https://github.com/Xilinx/PYNQ/releases/tag/v2.7.0
Kind regards
Hi,
About 'import pynq', it is a long story but in this release in order for PYNQ to be compatible with other platforms it was moved to a virtual environment. You can see this in the warning message path 'pynq-venv'.
I assume when you ssh into the board you did so as the user xilinx (or some other user you added), try running the Python interpreter as sudo and see if that helps.
Kind regards
If I sudo python, is says
ModuleNotFoundError: No module named 'pynq'
If I don't do sudo, it complains when I do(import pynq passes..) overlay = Overlay("./my_bitstream.bit")
OSError: Root permissions required.
Hi, You must have done something different than before if import pynq now works :-)
Did you make sure the .bit you are using and folder it is in has user privileges?
Kind regards
What I meant is,
sudo python my_python.py
results in ModuleNotFoundError: No module named 'pynq'
like below
python my_python.py
results in OSError: Root permissions required
like below.
I did chmod 777 my_bitstream
Hi, Thanks for clearing up what you meant. As I mentioned prior, a virtual environment is now used for PYNQ. Mainly so that it is compatible with some of the other Xilinx boards that directly run full Canonical Ubuntu vs. PYNQ that uses a custom ubuntu rootfs. All platforms now use PYNQ with the venv for v2.7.
See release notes here: https://github.com/Xilinx/PYNQ/releases/tag/v2.7.0
I don't have a board up and running to verify and give you exact syntax but basically when you are logged into the terminal you need to activate the pynq virtual environment venv then try running your code.
This is not actually an Ultra96 issue, it is a new behavior of PYNQ v2.7 in general. Unfortunately I am not aware of any documentation that explains this in more detail at this time. Otherwise I would point you to it.
Official PYNQ support and discussion can be found under Support here: http://www.pynq.io
I am sure many others will have similar issues and it would be good to post your questions and discuss it on the official forum so that it can benefit others too.
I hope that helps!
Kind regards
Thanks for the prompt responses. So I managed to get it working. Because of the permission issue, I logged in as root, and then activate pynq-venv.
sudo -s
source /usr/local/share/pynq-venv/bin/activate
python my_python.py
Hi, I am using the recent v2.7 image for Ultra96 v2. I wrote the image to sd card and ssh to the board. I opened up the python interactive session by typing python, and am trying to import pynq and xlnk, it doesn't work. I was able to use v2.5 with Ultra96v2 normally.