
Burned by PEP 668 on Ubuntu 24.04 — How I Fixed the Monthly Automation Script
Burned by PEP 668 on Ubuntu 24.04 — How I Fixed the Monthly Automation Script TL;DR Ubuntu 24.04 blocks pip install with the externally-managed-environment error. Using a virtual environment is the correct fix — but in my case, the real root cause was an environment mismatch : the check phase ran on a different server than the execution phase. I solved it with an SSH pivot. Background I have a month-end automation script that handles timesheet entry, expense submission, and invoice sending. It uses Playwright + openpyxl + Google APIs to auto-login to multiple vendor systems and fill out forms. This script is triggered by a cron job on joe (192.168.x.x, Ubuntu 24.04). What Happened Around 5 PM on March 25th, the month-end automation failed. error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, either use apt or use a virtual environment. pip install playwright was blocked. PEP 668. PEP 668 is a specification introduced
Continue reading on Dev.to
Opens in a new tab




