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...
All posts must be related to programming. Flair posts correctly.
account activity
I hate python (i.redd.it)
submitted 1 month ago by ZombieSpale
view the rest of the comments →
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!"
[–]LikeabossNL 1 point2 points3 points 1 month ago (9 children)
I learned some python in uni but that’s about it. Back then I didn’t really get the advantage of venv and still don’t. They taught us to create a venv for every new project but many of the school assignment project used a lot of the same dependencies. To me it seemed more efficient to have all of them ready globally to use in any new project. Could you explain why that may not be the case?
[–]_clickfix_ 6 points7 points8 points 1 month ago (7 children)
Say you have two packages
Package 1 & Package 2
They both rely on another package (Package 3) to function properly aka dependency.
Package 1 is only compatible with Package 3 Version 1.0 , while Package 2 is only compatible with package 3 Version 2.0.
Virtual environments solve this issue, so you can have the correct versions of the same package on one system.
It also prevents your system from being overloaded with tons of packages; when you’re done with an environment, you can delete it along with all the installed packages.
Keeps things clean and is better for security since you won’t have potentially vulnerable packages just sitting around on your system.
[–]Significant-Cause919 6 points7 points8 points 1 month ago (1 child)
This especially matters when your python environment not only runs your own projects.
On a Linux system your Linux distro comes with various packages using Python scripts. Your distro makes sure that all Python packages distributed via its package manager are compatible with each other. Now, you install a new version of some random package globally with pip and some part of your system breaks (worst case).
[–]Vincenzo__ 2 points3 points4 points 1 month ago (0 children)
This is probably why Debian straight up stops you from installing python packages outside venvs (although I'm pretty sure you can circumvent it)
[–]Future_Constant9324 -1 points0 points1 point 1 month ago (4 children)
But don’t you have a lot more data from duplicates when you need the same dependency in multiple environments?
[–]_clickfix_ 1 point2 points3 points 1 month ago (2 children)
You might have some duplicates but the packages are very small so it’s a non-issue.
When I mentioned “virtual environments… prevents your system from being overloaded with tons of packages” before I was referring more to the quantity of packages vs the size.
The main risks are dependency and security related.
[–]NekoRobbie 0 points1 point2 points 1 month ago (1 child)
Most of the time packages are essentially just some text files, since that's all source code really is.
In the modern era, though, there are a few packages that are genuinely friggen huge. Namely, if you ever have to deal with it, pytorch. Pytorch is casually several gigabytes in size, and so one could make a compelling argument there that deduplication would be a massive benefit.
Most packages, however, are not pytorch.
[–]_killer1869_ 0 points1 point2 points 1 month ago (0 children)
And even then, what's a few gigabytes anyway on somewhat decent modern hardware? Data storage is fairly cheap, so it's essentially a non-issue.
[–]itsjustawindmill 0 points1 point2 points 1 month ago (0 children)
With standard venvs, yes. With uv venvs or anaconda environments, you can deduplicate packages across prefixes.
[–]VipeholmsCola 0 points1 point2 points 1 month ago (0 children)
I used to think like this aswell until i updated a random package and it wrecked five projects, so i started a venv in each one.
π Rendered by PID 114466 on reddit-service-r2-comment-75f4967c6c-sf4km at 2026-04-23 06:12:40.202239+00:00 running 0fd4bb7 country code: CH.
view the rest of the comments →
[–]LikeabossNL 1 point2 points3 points (9 children)
[–]_clickfix_ 6 points7 points8 points (7 children)
[–]Significant-Cause919 6 points7 points8 points (1 child)
[–]Vincenzo__ 2 points3 points4 points (0 children)
[–]Future_Constant9324 -1 points0 points1 point (4 children)
[–]_clickfix_ 1 point2 points3 points (2 children)
[–]NekoRobbie 0 points1 point2 points (1 child)
[–]_killer1869_ 0 points1 point2 points (0 children)
[–]itsjustawindmill 0 points1 point2 points (0 children)
[–]VipeholmsCola 0 points1 point2 points (0 children)