# Why do I need Virtual Python environment?

**URL:** https://forums.pimoroni.com/t/why-do-i-need-virtual-python-environment/27250
**Category:** Support
**Created:** [February 5, 2025, 10:08am UTC](https://forums.pimoroni.com/t/why-do-i-need-virtual-python-environment/27250 "2025-02-05T10:08:02Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![hel](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/hel/32/6075_2.png) [@hel](https://forums.pimoroni.com/u/hel)
#### Post date: [February 5, 2025, 1:04pm UTC](https://forums.pimoroni.com/t/why-do-i-need-virtual-python-environment/27250/3 "2025-02-05T13:04:51Z")

</div>

More of a recommendation from Python/upstream Linux, which has been overdue for implementation in Pi OS for some time, as I understand it.

@gadgetoid wrote an quick intro to venvs here, which includes details of how to use them with Thonny:

> **[Python Virtual Environments on Raspberry Pi Bookworm](https://pimoroni.github.io/venv-python/)**
>
> An introduction to Python Venv on
> Raspberry Pi OS Bookworm.

This article also provides a nice (brief!) intro:

[https://www.raspberrypi.com/news/using-python-with-virtual-environments-the-magpi-148/](https://www.raspberrypi.com/news/using-python-with-virtual-environments-the-magpi-148/)

And Adafruit’s guide is a bit chunkier but contains lots of good info (including how you can set up a Python script as a service so it will run at boot):

> **[Python Virtual Environment Usage on Raspberry Pi](https://learn.adafruit.com/python-virtual-environment-usage-on-raspberry-pi/)**
>
> How set up Python Virtual Environments as required by Raspberry Pi OS

---

_[View the full topic](https://forums.pimoroni.com/t/why-do-i-need-virtual-python-environment/27250)._
