Appearance
Create a Virtual Environment
It is strongly recommended to install the package inside a dedicated virtual environment rather than into your system-wide Python installation. This keeps the package and its dependencies isolated from other projects and avoids version conflicts.
This step is shared by both installation methods — do this first, then continue to either Install with pip or Install with Poetry.
1. Choose a location for the environment
Create the virtual environment inside your project folder, typically named .venv or venv. From your project's root directory, run the appropriate command below.
2. Create the environment
Windows (PowerShell):
powershell
python -m venv .venvWindows (cmd.exe):
cmd
python -m venv .venvmacOS / Linux (bash/zsh):
bash
python3 -m venv .venvThis creates a .venv folder in your project directory containing a self-contained copy of the Python interpreter, pip, and the venv standard library module. No packages are installed yet — the environment is empty except for the base tooling.
If
pythonis not recognized, verify Python 3.12+ is installed and added to yourPATH. You can check your installed version withpython --version(orpython3 --versionon macOS/Linux).
3. Activate the environment
You must activate the environment in every new terminal session before installing or using the package.
Windows (PowerShell):
powershell
.venv\Scripts\Activate.ps1If activation fails with a message about execution policies, PowerShell's script execution is restricted. Allow local scripts for your user account by running:
powershell
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSignedThen re-run the activation command.
Windows (cmd.exe):
cmd
.venv\Scripts\activate.batmacOS / Linux (bash/zsh):
bash
source .venv/bin/activateOnce activated, your shell prompt is prefixed with (.venv), indicating that the environment is active. Any pip install or python command now runs inside the isolated environment rather than affecting your system Python.
4. Deactivate when finished
When you are done working, you can leave the virtual environment with:
bash
deactivateThis works the same way on Windows, macOS, and Linux. Deactivating returns your shell to using the system Python. You do not need to deactivate before closing the terminal — the environment is only active for the current session.
Next steps
With the virtual environment created and activated, continue with your chosen installation method: