Postgresql While Loop Exit Python Venv Install