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

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS
 

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!

you are viewing a single comment's thread
view the rest of the comments
[–] jerkface@lemmy.ca 27 points 1 day ago* (last edited 1 day ago) (1 children)

This is probably a problem with how the question is being asked, but...

A .py file is not an application. It might be a component of an application but there is no general way to "install" a .py file. If you are coming from microsoft, you can think of a .py file as similar to a .bat file, but it might also be more like a .dll file.

If the .py file contains a script meant to be run like a .bat file, you can to run it from wherever you saved it using the Python interpreter. That is what is occurring in this example from your page:

python3 rectarg.py R230122W.cht R230122W.txt output.tif --target_dpi 300 --background GS10 --label_axis_visible X=B

The user is using the python3 command to run the rectarg.py script from the current directory, and passing it arguments with the rest of the commandline. This doesn't require installing rectarg.py, just knowing the path (or in this case, being in that path).

You also need to make sure all the dependencies are installed. Those are usually listed in a requirements.txt file and can be installed with pip.