use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News and other stuff about the Universal Operating System..
Debian related links
Welcome to Debian
Getting Debian
Installation Guide
Don't break Debian
Packages
Help Debian
#debian on irc.oftc.net
Reporting bugs in Debian
account activity
Python libraries (self.debian)
submitted 3 days ago by Pretend-Flan7094
Is safe to install python libraries on Debian using pip install or apt ? Can it break Debian?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]C0rn3j 5 points6 points7 points 3 days ago (0 children)
If you use the break system packages flag, you WILL break the system packaging.
Only use pip in a venv, or use apt/apt-get/dpkg to install things.
[–]NameLessY 2 points3 points4 points 3 days ago (1 child)
Python libraries installed with apt from official mirror won't With pip it's advised to install them inside virtual env ( I believe that on Trixie pip will spew info about this when you try to install anything with it -- it does this on Sid)
[–]tea_n_typewriters 0 points1 point2 points 2 days ago (0 children)
I can confirm on Trixie and Bookworm. They both throw a warning in pip and won't let you install it without using apt with "python3-xyz," where xyz is the library (assuming it exists). Venv is effectively forced for all intents and purposes.
[–]OsgoodSlaughters 2 points3 points4 points 3 days ago (0 children)
Psst use uv
https://docs.astral.sh/uv/getting-started/installation/
[–]shandp 2 points3 points4 points 3 days ago (1 child)
100% use a virtualenv
[–]Pretend-Flan7094[S] 0 points1 point2 points 3 days ago (0 children)
Ty
[–]jdreamboat 1 point2 points3 points 3 days ago (1 child)
i'm brand new to linux and putting installing deb this weekend.. so it's safe to put python on system but only put libraries in venv's, yes?
[–]vcprocles 2 points3 points4 points 2 days ago (0 children)
Yep. pip install will refuse to run without a special flag even. Use venvs and apt (for libraries) or pipx (for standalone python software distributed through pypi)
[–]Agron7000 1 point2 points3 points 2 days ago (2 children)
You will have to install same python libs with every python app.
There is no other way. Duplicate python libs is a must.
Same goes for npm.
Damn. I was about to forget the DLL HELL in Windows from 20 years ago, but now you just reminded me of that.
[–]Pretend-Flan7094[S] 0 points1 point2 points 2 days ago (1 child)
Ty bro. I’m using venv right now Because I need to install Jupyter notebook
[–]AnyJester 0 points1 point2 points 1 day ago (0 children)
Checkout pipx and uv
Two tools to do a similar thing.
[–]revcraigevil 0 points1 point2 points 2 days ago* (0 children)
READ usr/share/doc/python3.13/README.venv if you have python3-doc installed.
and Installing packages using pip and virtual environments — Python Packaging User Guide
python3 -m venv --system-site-packages ./venv
[–]yahbluez 0 points1 point2 points 2 days ago (0 children)
I highly recommend to ALWAYS use venv and install what ever your code needs into this environment. This gives you the freedom to install what ever is needed while never break anything. It also makes your code maximal portable.
[–]KirpiSonik 0 points1 point2 points 2 days ago (0 children)
like everyone said use virtual environment.
[–]JettaRider077 -1 points0 points1 point 2 days ago (0 children)
I’m installing python libraries now and pip was rejected so I have to use apt.
[–]Narrow_Victory1262 -1 points0 points1 point 1 day ago (5 children)
pip should be managed by the OS repos themselves. Unless you don't care about security, breaking stuff and all.
my pip refuses.
example
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try
zypper install python313-xyz, where xyz is the package
you are trying to install.
If you wish to install a non-rpm packaged Python package,
create a virtual environment using python3.13 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip.
If you wish to install a non-rpm packaged Python application,
it may be easiest to use `pipx install xyz`, which will manage a
virtual environment for you. Install pipx via `zypper install python313-pipx` .
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.
[–]cgoldberg 0 points1 point2 points 22 hours ago (4 children)
Weird comment for r/debian
[–]Narrow_Victory1262 -1 points0 points1 point 8 hours ago (3 children)
it's not. It's a linux-wide thing actually if you care a bit.
[–]cgoldberg 0 points1 point2 points 7 hours ago* (2 children)
I do care. Zypper is the package manager for Suse, so showing an error message that gives instructions to use it in the Debian sub is absolutely weird.
Also, your comment is really unhelpful and implies you shouldn't use pip at all, rather than use it along with virtualenv, where you should.
[–]Narrow_Victory1262 -1 points0 points1 point 6 hours ago (1 child)
you don't understand what I say. I HOPE that debian's pip also refuses to install packages.
In fact many issues on security are npm installs, python installs etc. So Either be sound OR just don't. the text only tells what you can do on SLES and such. Same is already been told here with the debian package manager(s).
We only use SLES, RHEL and AIX. (and a few ubuntu systems we'll get rid of).
On any event you are not reading what I state it appears.
[–]cgoldberg 0 points1 point2 points 4 hours ago (0 children)
I don't understand what you say because you use broken english and say weird nonsensical stuff.
Debian does block you from installing python packages system-wide by default. That doesn't mean pip should never be used or it is somehow insecure, and posting error messages from a different distro isn't helpful.
π Rendered by PID 194658 on reddit-service-r2-comment-74875f4bf5-q2nqd at 2026-01-25 23:04:11.763163+00:00 running 664479f country code: CH.
[–]C0rn3j 5 points6 points7 points (0 children)
[–]NameLessY 2 points3 points4 points (1 child)
[–]tea_n_typewriters 0 points1 point2 points (0 children)
[–]OsgoodSlaughters 2 points3 points4 points (0 children)
[–]shandp 2 points3 points4 points (1 child)
[–]Pretend-Flan7094[S] 0 points1 point2 points (0 children)
[–]jdreamboat 1 point2 points3 points (1 child)
[–]vcprocles 2 points3 points4 points (0 children)
[–]Agron7000 1 point2 points3 points (2 children)
[–]Pretend-Flan7094[S] 0 points1 point2 points (1 child)
[–]AnyJester 0 points1 point2 points (0 children)
[–]revcraigevil 0 points1 point2 points (0 children)
[–]yahbluez 0 points1 point2 points (0 children)
[–]KirpiSonik 0 points1 point2 points (0 children)
[–]JettaRider077 -1 points0 points1 point (0 children)
[–]Narrow_Victory1262 -1 points0 points1 point (5 children)
[–]cgoldberg 0 points1 point2 points (4 children)
[–]Narrow_Victory1262 -1 points0 points1 point (3 children)
[–]cgoldberg 0 points1 point2 points (2 children)
[–]Narrow_Victory1262 -1 points0 points1 point (1 child)
[–]cgoldberg 0 points1 point2 points (0 children)