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 dislike installing python dependencies globally.
It’s like keeping your vacuum cleaner, lawnmower, and washing machine in your living room.
Someone mentioned virtualenv which I expect is the best way to encapsulate a set of python dependencies.
That said, nix package manager on debian (not nixos) will provide the same encapsulation in a language agnostic way. As in, you can use it for python or node or rust or binaries or cli tools or GUI apps or anything really.
Learning about nix just to run this one script is an over engineered solution, but I feel like its worth a mention because its definitely the best way to run anything you want in a way that won’t clutter up your living room.
The details for creating a shell with python dependencies are here:
https://wiki.nixos.org/wiki/Python