Skip to content

How to set up a Python virtual environment (venv)

Linux

FAQ · Linux · Help & Support

07. Sep 2023 1 min

Using a virtual environment in Python is good practice for keeping project dependencies separate. Install the python3-venv package with sudo apt install python3-venv. Then create a new virtual environment with python3 -m venv myenv. Activate it with source myenv/bin/activate. You can now install packages that will only be available inside this virtual environment.

Still have questions?

Our support team is happy to help - via ticket, email, or phone.