# Controoling rfsoc 4x2 using python directly

**URL:** https://discuss.pynq.io/t/controoling-rfsoc-4x2-using-python-directly/8872
**Category:** Support
**Created:** [November 19, 2025, 9:25am UTC](https://discuss.pynq.io/t/controoling-rfsoc-4x2-using-python-directly/8872 "2025-11-19T09:25:28Z")
**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: [November 19, 2025, 10:20am UTC](https://discuss.pynq.io/t/controoling-rfsoc-4x2-using-python-directly/8872/2 "2025-11-19T10:20:24Z")

</div>

Hi @yefj

Please see this post on running PYNQ scripts outside the Jupyter environment:

> [@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/controoling-rfsoc-4x2-using-python-directly/8872)._
