What’s the correct process to install and run a .py application and its dependencies? Where should I save the .py file, where should I run it from, and can it interfere with the rest of my system?
Often there is an application/script I’d like to use and it is provided as a .py file download, along with a list of other applications/scripts that need to be installed separately for it to work. Often not all of these dependencies are available in my distro’s repository. There seems to be an assumption of prior knowledge as to how to get set up to run .py files, and it is therefore not documented on developers pages. Can anyone fill me in?
I’d like to install this application. Perhaps it could be used as an example to help explain the process.
My distro is Debian 13, in case that’s relevant.
Thanks!


I’d recommend installing those python dependencies using apt, so that when you update your system packages, the python libraries get updated, too. Pip, on the other hand, is useful for development but is detatched from apt and you will definitely forget to pip update unlike apt update which you hopefully do frequently. Use the names of the packages the readme provides in the pip install … instruction. For example, for numpy, you can install this.
Then, since that python script has a shebang at the top, you can add it to a directory in your $PATH and mark it executable with chmod, and you can invoke the script in your shell from any directory with just the file name.
The pip library of modules is many times larger than those available in the distro repo.
As popularity doesn’t equal validity, repo size isn’t a measure of safety.
Ask a system person about the massive validation hole in pips (and dockers and CPAN and composer bits and venvs and crates and gems) and why enterprise people and the safety-aware avoid this like it’s toxic.