SShortSingh.
Back to feed

Fixing pip's externally-managed-environment error (PEP 668) on system Python

0
·1 views

The error appears when pip refuses an install because the interpreter belongs to the operating system, which marks it with an EXTERNALLY-MANAGED file. Pip 23.0.1 and later enforce this check to protect packages that apt manages from being overwritten or broken by later upgrades. The article recommends installing CLI tools with pipx, using apt for system-used libraries, or creating a virtual environment, and it warns against the --break-system-packages override or deleting the marker file. For Docker and CI, it shows building a venv inside the image and explicitly naming the interpreter, and it notes that --user installs no longer work reliably on Debian and Ubuntu.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Fixing Turso Connection Failures on Next.js Serverless Cold Starts

A developer building PulseROI, a влияние-marketing ROI tracker for Indian D2C brands, found intermittent database failures on Vercel serverless functions during peak hours. Cold-started containers attempted to reach a Turso libSQL database before the network was fully ready, causing TCP handshake timeouts. The original fix of instantiating the client at module top level proved fragile, so the developer switched to a lazily created singleton client. They also added a retry wrapper with incremental delays to let the edge routing layer settle before queries run. The approach stabilized initialization for the agent memory service.

0
ProgrammingDEV Community ·

Building a Real-Time Dashboard to Monitor Instagram DM Automation

The guide argues that running Instagram DM automation without a dashboard leaves creators unable to see what is really happening. It recommends tracking four core metrics: conversation volume, trigger activity, reply speed, and outcomes such as link clicks or lead captures. Data flows in through the Instagram Graph API, using a messages webhook for real-time events and periodic polling of conversations as a backup. The author advises storing each event as a row rather than only counters, so that metrics like median reply time can be computed later. A basic dashboard can start with four panels covering volume over time, trigger breakdown, and reply speed.

0
ProgrammingDEV Community ·

Freshness Guard Flagged 20 Stale Dashboard Stats That Were Actually Correct

A developer's monitoring job for dashboard figures reported 20 stale counters on a site, though the displayed values were accurate. The page keeps each number in static HTML so non-JavaScript readers and machines see it, and an hourly writer updates those values, while a browser script shows live figures. The guard misread the cases because the writer's log recorded only five of the nine keys it actually updates, so four keys had no baseline and were compared against a live value that had moved. The same flaw had surfaced earlier when a newly written key was left out of the log. The author argues the underlying problem is two lists that should match but have no mechanism enforcing that.

0
ProgrammingDEV Community ·

Malicious agent-framework releases 1.26.1 and 1.26.2 on PyPI carry a credential-stealing .pth file

Versions 1.26.1 and 1.26.2 of the agent-framework package on PyPI were found to contain a credential stealer hidden in a .pth file, which runs when the Python interpreter starts rather than when the package is imported. After 1.26.1 was pulled, a 1.26.2 release with the same payload under renamed files appeared 33 minutes later, raising concern about the publisher's build or upload pipeline. Because automated CI/CD runners and agent workers often install dependencies and then invoke Python, the malware can execute and expose secrets before anyone notices the yanked release. Version 1.26.0 is identified as the last known clean release, and affected environments, caches, and container layers should be audited and isolated accordingly.