# Pynq on Alveo and XRT 2021.2

**URL:** <https://discuss.pynq.io/t/pynq-on-alveo-and-xrt-2021-2/3568>\
**Category:** Support\
**Created:** [January 19, 2022, 2:47pm UTC](https://discuss.pynq.io/t/pynq-on-alveo-and-xrt-2021-2/3568 "2022-01-19T14:47:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gustandil](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/gustandil/32/2681_2.png) [@gustandil](https://discuss.pynq.io/u/gustandil)\
**Post date:** [January 19, 2022, 2:47pm UTC](https://discuss.pynq.io/t/pynq-on-alveo-and-xrt-2021-2/3568/1 "2022-01-19T14:47:20Z")

</div>

Hi,

I updated the Alveo U200 environment and tried to run Pynq on it.  
It seems that Python libraries are using the deprecated Xbutil command options.  
Any suggestion or workaround?

Best Regards, GS

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [January 19, 2022, 3:30pm UTC](https://discuss.pynq.io/t/pynq-on-alveo-and-xrt-2021-2/3568/2 "2022-01-19T15:30:29Z")

</div>

Hi Gustavo,

This is a known bug for us, we are working on a clean solution. In the meantime, you could try this workaround

Edit this line where the pynq package is

> <https://github.com/Xilinx/PYNQ/blob/master/pynq/pl_server/xrt_device.py#L85>

and add `--legacy`. For instance, [‘xbutil’, ‘dump’, ‘–legacy’]

Mario

---

<div class="post-metadata">

**Author:** ![gustandil](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/gustandil/32/2681_2.png) [@gustandil](https://discuss.pynq.io/u/gustandil)\
**Post date:** [January 19, 2022, 4:16pm UTC](https://discuss.pynq.io/t/pynq-on-alveo-and-xrt-2021-2/3568/3 "2022-01-19T16:16:32Z")

</div>

Hi Mario,

Thank you for you quick response.  
I already made this change, because I use “–legacy” in commands for installation.  
To be specific, I modify  
…/anaconda3/lib/python3.7/site-packages/pynq/pl\_server/xrt\_device.py and I found more errors.

I copy the error, just in case has an easy workaround.

Best Regards, GS

* * *

ModuleNotFoundError Traceback (most recent call last)  
 in   
----\> 1 import pynq  
2 import numpy as np  
3  
4 # program the device  
5 ol = pynq.Overlay(“intro.xclbin”)

~/anaconda3/lib/python3.7/site-packages/pynq/ **init**.py in   
45 from .buffer import allocate  
46 from .pl\_server import Device  
—\> 47 from . import lib  
48  
49

~/anaconda3/lib/python3.7/site-packages/pynq/lib/ **init**.py in   
29  
30  
—\> 31 from .pynqmicroblaze import PynqMicroblaze  
32 from .pynqmicroblaze import MicroblazeRPC  
33 from .pynqmicroblaze import MicroblazeLibrary

~/anaconda3/lib/python3.7/site-packages/pynq/lib/pynqmicroblaze/ **init**.py in   
42 try:  
43 **IPYTHON**  
—\> 44 from .magic import MicroblazeMagics  
45 except NameError:  
46 pass

~/anaconda3/lib/python3.7/site-packages/pynq/lib/pynqmicroblaze/magic.py in   
102 get\_ipython().register\_magics(MicroblazeMagics)  
103 display\_javascript(js, raw=True)  
 → 104 import nest\_asyncio  
105 nest\_asyncio.apply()  
106

ModuleNotFoundError: No module named ‘nest\_asyncio’

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [January 19, 2022, 4:27pm UTC](https://discuss.pynq.io/t/pynq-on-alveo-and-xrt-2021-2/3568/4 "2022-01-19T16:27:07Z")

</div>

```auto
→ 104 import nest_asyncio
105 nest_asyncio.apply()
106

ModuleNotFoundError: No module named ‘nest_asyncio’

```

This python package is missing, you can install it using command below. I recommend you use the Jupyter Lab terminal

```nohighlight
python3 -m pip install nest_asyncio

```

---

<div class="post-metadata">

**Author:** ![gustandil](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/gustandil/32/2681_2.png) [@gustandil](https://discuss.pynq.io/u/gustandil)\
**Post date:** [January 20, 2022, 2:33pm UTC](https://discuss.pynq.io/t/pynq-on-alveo-and-xrt-2021-2/3568/5 "2022-01-20T14:33:18Z")

</div>

Hi Mario,

Thank you very much for the information. Now it works.  
Just a comment: the xclbin provided works with shell:  
xilinx-u200-xdma-201830.2-2580015\_18.04.deb  
but not  
xilinx-u200\_2021.2\_2021\_1021\_1001-all.deb

if you run with the 2021 shell, you’ll obtain:  
RuntimeError: Programming Device failed: ENOTSUP (95) Operation not supported/Shell does not match

Best Regards, GS

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [June 13, 2022, 5:21pm UTC](https://discuss.pynq.io/t/pynq-on-alveo-and-xrt-2021-2/3568/6 "2022-06-13T17:21:48Z")

</div>

Closed on June 13, 2022, 5:21pm UTC


