python is already in ubuntu, if you want to make sure that it's available:
sudo apt update && sudo apt install python3-pip python3-venv -y
curl -LsSf https://astral.sh/uv/install.sh | sh
curl -sSL https://install.python-poetry.org | python3 -
Type to start searching