Zum Hauptinhalt springen
Intelligence View
⚡ tsecurity.de Intelligence

Pip install and Python's externally managed

TL;DR: pip install is on the way out. Installing Python packages must be done via APT, aka. Kali Linux’s package manager. Python packages coming from other s…

Beitrag
0
Seite
0
↗ Quelle (kali.org)
Quelle & Fakten · 5 Min. Lesezeit
Quelle: kali.org
Rubrik: Admin & Dev Tools

TL;DR: pip install is on the way out. Installing Python packages must be done via APT, aka. Kali Linux’s package manager. Python packages coming from other sources should be installed in virtual environments.


Long story below.


Some background


Back in February this year, for a few days, some of you might have tried (and failed) to install Python packages with Pip, aka. Python’s package manager. Suddenly it didn’t work anymore, and it gave this error message instead:


┌──(root㉿kali)-[~]
└─$ pip install xyz
error: externally-managed-environment
? This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation
or OS distribution provider. You can override this, at the risk of breaking
your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

This change came about without a notice, and judging by the early reports that we received, it was clear that it would impact many users. So we reverted it, and therefore pip install still works in Kali Linux these days. But not for long: when Python 3.12 hits Kali (around end of 2023 or beginning of 2024), it will stop working, this time for good. There’s not much we can do about it, it’s an upstream change, we have to go with the flow.


So why this change? Running pip install as root, in order to install Python packages system-wide, has never been a great idea. In a Linux distribution such as Kali, Python packages are already installed and managed via APT. If you bring in another package manager (pip in this case), it is likely to break packages and programs that were installed by APT, sooner or later. Then APT might break again what was installed by pip. Both package managers will endlessly step on each other’s toes.


One could also run pip install --user to install packages in the user’s home directory, but the problem is the same. Those packages will be picked up by Python applications as they run, and might not be compatible with other packages installed by APT, causing programs to misbehave or break.


The issue is not new, but it doesn’t impact all users equally. Seasoned users of Linux distributions already know what to do, and NOT to do, and they can fix their system when it breaks. However, unexperienced users don’t know, so they are likely to shoot themselves in the foot. And nobody can blame them, there are so many web pages out there recommending to run sudo pip install without providing enough context.


We (Kali developers, and more generally distro developers), are well aware of the issue: bug reports for Python applications that don’t work are a common occurence, and we often can’t reproduce the issue, and we often find out that it doesn’t work because some packages or applications were installed with pip, and interfere with other packages installed with APT. These recurring bug reports are not actionable, there’s nothing we can fix on our side. Users get burnt and they learn from it, but it’s no fun.


What’s changing


Now, back to the upcoming change: in Kali Linux, starting with Python 3.12, pip will refuse to perform system-wide installs (sudo pip install) as well as user home directory installs (pip install --user). This is good news, because it will make it harder for unexperienced users to break their system. This is a welcome change, and we are thankful to those who drove this change and made it happen. Long-term, it will be less pain for everyone. But short-term, some users won’t like it, of course, we know.


So if you’re one of those who run sudo pip install, who have it hardwired in your fingers… well, you’ll have to adjust. You might want to have a look at pipx, get more familiar with Python’s virtual environments, and spend some time reading PEP 668: Marking Python environments as externally managed to better understand the issue at hand.


To finish, and to give a bit of a broader context: the PEP 668 proposal came about as a coordinated effort from various software distributions to fix this long-standing issue of pip breaking other package managers too easily. The change is already effective in other Linux distros (like the latest release of Debian). In Kali Linux, we just delayed it a bit, so that we can warn you in advance, so that you can adjust your workflow and scripts. But the change is coming with Python 3.12, there’s no point delaying it further.


Thanks for reading!

Social ReaktionenReagiere als Erste:r — dein Feedback zählt!
Informations-Bewertung:
✏️ Information ergänzen
🛡️ Versioniert via CMS-Revisions-Engine (Freigabe-Queue für Gäste)

💬 Community-Diskussion & Kommentare

🌐 Zum Hauptchat

Starte die Diskussion im Social-Chat Broadcast Stream oder reiche oben über „Information ergänzen“ einen Fachbeitrag ein.

Security Briefing Kostenlos · 1-Klick-Abmeldung

Intelligence Digest — kostenlos

Täglich die wichtigsten Security-News · jederzeit abbestellbar

Community Rating & Social Proof
⭐ Leser-Wertung
–
Ø / 5.0
Noch keine Leser-Bewertungen
War dieser Artikel hilfreich?
0
Jetzt Bewertung abgeben
Detail-Bewertung (optional)
Inhalt & Qualität
Quelle & Glaubwürdigkeit
Aktualität

Verwandte Story-Cluster & Quellen (Vektor-KI)

6 Cluster
18 Quellen
Black Friday bei VZMore: Bis 600 Euro Rabatt auf Power-Mini-PCs
WinFuture News vor 44 Min.
17 weitere Quellen
Latest from TechRadarvor 1 Std.The best Black Friday turntable deals, as picked by an audio editor Latest from TechRadarvor 10 Min.40+ best Black Friday deals in the UK — Switch 2, Shark vacuums, iPhone 18, Lego, PS5 bundles, Samsung, LG OLED TVs, and more CNETvor 12 TagenUpgrade Your Home Security for Less. Score Up to 65% Off With These Black Friday Ring Deals Giga.devor 1 Std.Vor Black Friday zu viel bezahlt? Mit einem Trick könnt ihr doch noch sparen t3n.devor 23 Min.Black Friday: Diese Samsung-Angebote bei Amazon und Media Markt lohnen sich netzwelt.devor 2 Std.Black-Friday-Kracher: Huawei-Smartwatch mit EKG für unter 150 Euro Golem.devor 44 Min.Anzeige: Sony WH-1000XM6 Referenz-Kopfhörer am Black Friday zum Amazon-Bestpreis Macerkopf.devor 1 Std.Amazon Black Friday: Apple Pencil, WISO Steuer 2027, Microsoft 365, iPhone 18 Cases und mehr PC-WELTvor 25 Min.Leistungsstarker Mini-PC mit Intel Core Ultra 9: VZMORE iX9 Max erstmals unter 760 Euro Golem.devor 1 Std.Anzeige: Fahrradcomputer von Garmin zum Black Friday reduziert bei Amazon CNETvor 13 TagenGet up to 50% off Select Alexa Devices With Amazon’s Black Friday Upgrade Deal CNETvor 5 TagenBlack Friday Is Knocking Hundreds Off Apple’s iPads, and There’s Plenty to Choose From TechRepublicvor 3 Std.Amazon Cuts Google Pixel 11 Pro to $749 for Black Friday Golem.devor 2 Std.Videostreaming und Black Friday: Apple TV ein halbes Jahr lang zum halben Preis auch auf Amazon Golem.devor 2 Std.Anzeige: Smartwatch von Fitbit als Black Friday Deal zum halben Preis bei Media Markt appgefahren.devor 2 Std.Baseus U2 Pro Sicherheitskamera: Black Friday-Deal mit über 50 Prozent Rabatt Google Alertvor 5 Std.Fakeshops am Black Friday: Diese Tipps gibt das BSI - it-daily.net
17 Quellen
CVE-2026-99707 | Linux Kernel up to 6.12.117/6.18.63/7.3.4/7.4-rc1 khugepaged collapse_file use after free
VulDB Updates vor 1 Std.
16 weitere Quellen
VulDB Updatesvor 1 Std.CVE-2026-99728 | Linux Kernel up to 7.3.4/7.4-rc1 Deferred Split Scan mm/huge_memory deferred_split_scan/deferred_split_folio race condition VulDB Updatesvor 1 Std.CVE-2026-99715 | Linux Kernel up to 7.3.4/7.4-rc1 nvme-rdma nvme_rdma_queue_rq null pointer dereference VulDB Updatesvor 1 Std.CVE-2026-99730 | Linux Kernel up to 6.12.117/6.18.63/7.3.4/7.4-rc1 Filemap mm/filemap.c filemap_fault race condition VulDB Updatesvor 1 Std.CVE-2026-99724 | Linux Kernel up to 7.3.4/7.4-rc1 NTFS ntfs_read_compressed_block out-of-bounds VulDB Updatesvor 1 Std.CVE-2026-99725 | Linux Kernel up to 6.12.117/6.18.63/7.3.4/7.4-rc1 CIPSO cipso_v4_delopt buffer overflow VulDB Updatesvor 1 Std.CVE-2026-99735 | Linux Kernel up to 6.12.117/6.18.63/7.3.4/7.4-rc1 MGLRU mm/mglru.c walk_pud_range/walk_pmd_range race condition VulDB Updatesvor 1 Std.CVE-2026-99744 | Linux Kernel up to 6.12.117/6.18.63/7.3.4/7.4-rc1 atl1c atl1c_clean_rfd length buffer overflow VulDB Updatesvor 1 Std.CVE-2026-99746 | Linux Kernel up to 7.3.4/7.4-rc1 ASoC hda_sdw_bpt_close race condition VulDB Updatesvor 1 Std.CVE-2026-99690 | Linux Kernel up to 6.12.117/6.18.63/7.3.4/7.4-rc1 ocfs2 ocfs2_get_dentry_osb use after free VulDB Updatesvor 1 Std.CVE-2026-99678 | Linux Kernel up to 6.12.117/6.18.63/7.3.4/7.4-rc1 XFS xfs_iomap_write_direct integer overflow VulDB Updatesvor 1 Std.CVE-2026-99680 | Linux Kernel up to 6.12.117/6.18.63/7.3.4/7.4-rc1 XFS xfs_fs_map_blocks allocation of resources VulDB Updatesvor 1 Std.CVE-2026-99688 | Linux Kernel up to 6.12.117/6.18.63/7.3.4/7.4-rc1 sch_qfq net/sched/sch_qfq.c qfq_change_class use after free VulDB Updatesvor 1 Std.CVE-2026-99679 | Linux Kernel up to 7.3.4/7.4-rc1 xfs xfs_iomap_write_unwritten allocation of resources VulDB Updatesvor 1 Std.CVE-2026-99686 | Linux Kernel up to 6.18.63/7.3.4/7.4-rc1 vhost vhost_add_used_n_in_order integer overflow VulDB Updatesvor 1 Std.CVE-2026-99697 | Linux Kernel up to 6.12.117/6.18.63/7.3.4/7.4-rc1 memcontrol high_work_func use after free VulDB Updatesvor 1 Std.CVE-2026-99685 | Linux Kernel up to 6.12.117/6.18.63/7.3.4/7.4-rc1 iommu/virtio viommu_probe use after free
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Pip install and Python's externally managed

Thematisch verwandte Begriffe: install, Pythons, externally, managed · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
Widgets & Themen
Widgets werden geladen…
Nächster Beitrag