this post was submitted on 25 Feb 2026
40 points (93.5% liked)
Linux
63238 readers
768 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 6 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Hey when pip doesn’t work:
You’re using Debian, so if you don’t want to set up virtual environments the best bet is to install your dependencies using apt like a normal person. All the python stuff in apt will show up under the prefix python3-. So you’ll need python3-numpy, python3-tiffile etc.
Apt supports tab completion so something like “apt install python3-num” then the tab key would show a list of possible completions (and jump forward any letters that are common between completions).
If you want to use venvs there’s a bunch of posts explaining how to do that.
When you want to “install” the .py doohicky you just downloaded, put it in your path! $PATH will tell you what locations get scanned for executable files when you type something and you can add a local directory like ~/.bin to it, then put your .py file in there. If you go with venvs, put the .py file in the right place to run inside the venv, then make a one liner script that runs it from the venv with the file name set to what you wanna type to run the .py, put it in your local path directory and you’re off to the races!
I also use Debian and am coerced into using python software so reply with any questions and I’ll set you straight.
Thanks for the help! For some reason tab autocompletion doesn't work for me but that's an issue for another day...
This could be where I've been getting lost. How do I figure out what the right place is?
One man’s right place is another man’s evidence of clinical insanity. You could just leave them on your desktop and invoke them through the venv. You could make a folder called Folder For Python Scripts That Don’t Run Good and put all your different python things there.
You can also put the target python script inside the folder its respective venv lives in.
Really the world is your oyster because ultimately you’re gonna make another script that does something like “read $a; ~./<venv_location>/python3 <target_.py_file> $a;” and naming it what you wanna type to run your .py and put it in your local $PATH directory.
Don’t trust that one liner btw it’s definitley wrong.
Ok, so am I understanding correctly that for example the .py can be anywhere, as long as it is run from a suitable venv folder and the path to it is defined in the command?
Yeah, a python venv has two parts, one part is just a bunch of copies of some basic python shit that you know you’re gonna need, that’s honestly 99% of what you want when you do a venv and need to install a million stupid piles of crap by copy pasting a pip one liner into your shell.
You use this part by just invoking your python3 or pip command inside the venv folder. So ~./<venv_location>/pip install <joes_dumb_crap> or something.
The other one percent is actually invoking the venv which is a really important one percent in terms of not being a guy who plays fast and loose with his systems security and privacy when messing around with totally trustworthy python stuff. It’s only one percent because tbh no one is that guy they’re all the “do whatever just make it run” guy.
So you could have a script file called rectarg in your local path folder that invokes rectarg.py using the python3 executable inside your venv folder and passes whatever you type after “rectarg” straight to rectarg.py.