# No devices found, is the XRT environment sourced?

**URL:** https://discuss.pynq.io/t/no-devices-found-is-the-xrt-environment-sourced/8803
**Category:** Support
**Created:** [October 9, 2025, 10:27am UTC](https://discuss.pynq.io/t/no-devices-found-is-the-xrt-environment-sourced/8803 "2025-10-09T10:27:45Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![joshgoldsmith](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/joshgoldsmith/32/5347_2.png) [@joshgoldsmith](https://discuss.pynq.io/u/joshgoldsmith)
#### Post date: [October 10, 2025, 10:00am UTC](https://discuss.pynq.io/t/no-devices-found-is-the-xrt-environment-sourced/8803/2 "2025-10-10T10:00:47Z")

</div>

Hi @FELLOUH_Ayoub

You need to source the PYNQ environment before running Python scripts:

> [@Run python scripts in Pynq Environment](https://discuss.pynq.io/t/run-python-scripts-in-pynq-environment/7761/2):
>
> Hi @DiogoBaptista There is three steps to running PYNQ code from the command line: Make sure you are in sudo privileges (e.g. sudo su) Source the pynq venv environment source /etc/profile.d/pynq\_venv.sh 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

---

_[View the full topic](https://discuss.pynq.io/t/no-devices-found-is-the-xrt-environment-sourced/8803)._
