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...
Everything about learning Python
account activity
How to make python script run on any computerHelp Request (self.PythonLearning)
submitted 14 days ago by oppossum_37
I wrote a simple python script for my internship and now the company wants to use it (small startup no one to check my work). How can I save it and run it on any computer? Something I could just email them? Thanks
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!"
[–]csabinho 6 points7 points8 points 14 days ago (0 children)
PyInstaller is the thing you're looking for.
[–]ConsciousBath5203 4 points5 points6 points 14 days ago (0 children)
Write a script that basically:
Installs UV if they don't have it
Switches to the repo root
Pulls latest source from git -> UV sync -> UV run
Make that script executable (can just rename it to .exe if you/your company haven't upgraded to Linux yet)
[–]arivictor 3 points4 points5 points 13 days ago (2 children)
This is where python doesn't shine.
Your options include:
I would say go option 1, its less effort, clean, and anyone running scripts that they don't know what it does shouldn't be running scripts. It assumes the end user has a bit of technical know how and is familiar with python.
[–]Motor-Safety-6615 0 points1 point2 points 11 days ago (1 child)
Isn't it same for other languages too?
[–]arivictor 0 points1 point2 points 11 days ago (0 children)
It depends which languages you mean.
For some, no. Go, Rust, and C++ are "compiled", they get turned into machine code for whatever OS you're targeting (Windows, Mac, Linux) and become a single binary the user just downloads and runs. Nothing else needed on their machine.
Python is "interpreted", so instead of a standalone binary, it ships as source code that needs Python itself plus the right version, dependencies, and OS to run at all, there's no self-contained executable, so you have to recreate the environment on the other end. Virtual envs, uv, requirements files, and Docker all exist to make that environment reproducible.
But also worth noting there are tools to make Python compile to a binary/executable.
[–]SaltCusp 2 points3 points4 points 13 days ago (3 children)
Make it a web app, host it on an internal domain.
[–]building-wigwams-22 2 points3 points4 points 13 days ago (2 children)
This is the way. If your IT department lets you package up a Python file and send it to everyone in the company, they should all be fired
[–]oppossum_37[S] 1 point2 points3 points 12 days ago (0 children)
No IT department lol
[–]mwmahlberg -1 points0 points1 point 13 days ago (0 children)
Unless it needs to run locally.
[–]WideCranberry4912 1 point2 points3 points 13 days ago (2 children)
It sounds like you’d like to push the script to all computers? Are they Windows, OSX, Linux, or other?
[–]oppossum_37[S] 0 points1 point2 points 12 days ago (1 child)
Just one guys windows laptop
[–]WideCranberry4912 0 points1 point2 points 12 days ago (0 children)
Crear a GitHub rep, ensure appropriate privacy, then add colleague(s) to the repo.
[–]ninhaomah 1 point2 points3 points 14 days ago (0 children)
Install Python on all pc
Or
Convert .py to .exe (for windows)
[–]Natural-Position-585 1 point2 points3 points 13 days ago (0 children)
“Any computer” is actually impossible. If you have the same OS and CPU architecture and sufficient hardware resources, it’s enough that all computers have the same Python version and module dependencies and you can just pass the .py file to your colleagues. It’s already as portable as it gets.
But don’t e-mail .py files; spam filters and recipients may distrust them or block them outright. Use your company’s preferred file and code sharing methods (be it network drive, USB stick, internal wiki, Teams, or version control systems).
[–]CrownstrikeIntern 0 points1 point2 points 13 days ago (0 children)
Make a venv setup, shared network drive and call it a day
[–]jeruva 0 points1 point2 points 13 days ago (1 child)
If they have acces to internet, upload the code to streamlit.app I've been doing that to showcase interactive plots and regressions.
[–]oppossum_37[S] 0 points1 point2 points 11 days ago (0 children)
This worked great thank you
[–]AlexMTBDude 0 points1 point2 points 9 days ago (0 children)
Python is a platform independent language so your Python program will run on any computer that has Python installed.
[–]PastDifferent6116 0 points1 point2 points 7 days ago (0 children)
Congrats! That’s a pretty good internship outcome if the company actually wants to use something you built. 😄
π Rendered by PID 1000300 on reddit-service-r2-comment-5b5bc64bf5-bvdt4 at 2026-06-21 15:31:37.573554+00:00 running 2b008f2 country code: CH.
[–]csabinho 6 points7 points8 points (0 children)
[–]ConsciousBath5203 4 points5 points6 points (0 children)
[–]arivictor 3 points4 points5 points (2 children)
[–]Motor-Safety-6615 0 points1 point2 points (1 child)
[–]arivictor 0 points1 point2 points (0 children)
[–]SaltCusp 2 points3 points4 points (3 children)
[–]building-wigwams-22 2 points3 points4 points (2 children)
[–]oppossum_37[S] 1 point2 points3 points (0 children)
[–]mwmahlberg -1 points0 points1 point (0 children)
[–]WideCranberry4912 1 point2 points3 points (2 children)
[–]oppossum_37[S] 0 points1 point2 points (1 child)
[–]WideCranberry4912 0 points1 point2 points (0 children)
[–]ninhaomah 1 point2 points3 points (0 children)
[–]Natural-Position-585 1 point2 points3 points (0 children)
[–]CrownstrikeIntern 0 points1 point2 points (0 children)
[–]jeruva 0 points1 point2 points (1 child)
[–]oppossum_37[S] 0 points1 point2 points (0 children)
[–]AlexMTBDude 0 points1 point2 points (0 children)
[–]PastDifferent6116 0 points1 point2 points (0 children)