Set up a virtual environment
Syside Automator is a Python package, and the place to install it is an environment of your project’s own rather than the Python your machine came with. This tutorial explains why, then sets one up with uv or with venv and pip. If your project already has a virtual environment, or you know your way around uv or pip, go straight to Install Automator.
Why a virtual environment
A Python installed for the whole machine, whether it came with the operating system or from an installer, is shared by every script and tool on it. Installing packages into it carries three costs, each of which shows up as an error later rather than now:
Two projects that need different versions of the same package cannot both have it.
Recent Linux distributions, and Homebrew on macOS, refuse
pip installoutside a virtual environment altogether, witherror: externally-managed-environment, because their own tools depend on that Python.Nothing records what the project needs, so nobody can set it up again on a colleague’s machine or in a pipeline.
A virtual environment answers all three. It is a folder, conventionally
.venv inside the project, holding a private Python plus only the packages
you install into it. Deleting the folder removes everything, and the rest of
the machine never notices it was there.
Choose a tool
Two tools do the job, and Syside’s install pages show a command for each:
uv is one program that installs Python itself, creates the environment and installs packages into it, and it records the packages in a
pyproject.tomlfile. It works the same on every operating system, which is why this page recommends it when you have no preference.venv and pip ship with Python, so nothing else needs installing, at the cost of a few operating-system differences and of activating the environment in every new terminal.
Follow one of the two sections below.
Set up with uv
Install uv by following the uv installation guide for your operating system.
Open a new terminal and check that uv answers:
uv --versionIt prints the installed version.
Open a terminal in the folder that will hold your scripts and create the project:
uv init --python 3.14
Automator needs Python 3.12 or newer, and uv downloads the version named here if the machine lacks it. Without
--python, uv pins the project to whichever Python it finds first, and an older one makesuv add sysidefail. The folder now holds apyproject.toml, which records the project’s packages, a startermain.py, aREADME.md, a.python-versionpin and a new git repository.Run Python inside the environment for the first time:
uv run python -c "import sys; print(sys.executable)"
uv creates the
.venvfolder on this first run, and the printed path ends inside it:.venv\Scripts\python.exeon Windows,.venv/bin/pythonon macOS and Linux.
That is the whole setup. From now on, uv add <package> installs a package
into the environment and records it in pyproject.toml, and
uv run <command> runs a command inside the environment from any terminal,
with nothing to activate. The python and syside commands on this site are
written for an activated environment, so with uv run them as
uv run python ... and uv run syside .... The uv project
guide covers the rest.
Set up with venv and pip
Check that Python 3.12 or newer is installed. If the command is missing or reports an older version, install Python from python.org or from your Linux distribution’s packages, then open a new terminal:
py --versionIf
pyis not found butpython --versionanswers, usepythonin its place throughout.python3 --versionOpen a terminal in the folder that will hold your scripts and create the environment. A
.venvfolder appears, and nothing else on the machine changes:py -m venv .venv
python3 -m venv .venv
If this fails with
ensurepip is not available, install thepython3-venvpackage the error names and run it again. Debian and Ubuntu shipvenvseparately from Python.
Activate the environment
Activation makes python and pip in this terminal mean the ones inside
.venv, so pip install lands there. It lasts until the window closes, so
every new terminal needs activating again before any pip or python
command. Editors such as Visual Studio Code find a .venv in the opened
folder and activate it in their own terminals.
Run the activation script:
.venv\Scripts\activate
.venv\Scripts\Activate.ps1
PowerShell may block the activation with a “running scripts is disabled” error. To allow scripts for this window only, run:
Set-ExecutionPolicy Bypass -Scope Process -Force
Then run the activation script again.
Check that the environment is active:
where.exe pythonThe first line printed should end with
\.venv\Scripts\python.exe.
Run the activation script:
source .venv/bin/activate
Check that the environment is active:
which pythonThe printed path should end with
/.venv/bin/python.
What’s next
Install Automator installs Syside Automator into the environment you just made.
The uv project guide explains
pyproject.toml, the lockfile uv writes beside it, anduv run.The Python venv documentation covers how a virtual environment works and how to remove or recreate one.