To exit a Python virtual environment (venv) on Ubuntu, simply type the following command in your terminal:
deactivate