Skip to main content

Python Virtual Environment Usage

On Radxa OS, installing Python libraries system-wide with pip3 is restricted by the system. You can use a Python virtual environment to isolate project dependencies from the system environment.

error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.

Install the virtual environment tools

sudo apt install python3-venv

Create a virtual environment

python3 -m venv .venv

Activate the virtual environment

source .venv/bin/activate

Upgrade pip

pip3 install --upgrade pip

Deactivate the virtual environment

deactivate

    You need to be logged into GitHub to post a comment. If you are already logged in, please ignore this message.

    Radxa-docs © 2026 by Radxa Computer (Shenzhen) Co.,Ltd. is licensed under CC BY 4.0