Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Comments on How can I make a standalone executable from Python code?

Post

How can I make a standalone executable from Python code?

+0
−0

I know that I can make Python code run starting from the script, but this still requires the user to have Python installed (and will still rely on configuring the system so that it can find Python from the script, which can go wrong in a few different ways).

I want to be able to distribute my program to others who might not have Python installed, or even understand what Python is. I don't want to guide users through installing Python, or make an installer that does it for them (that seems like a lot of work, and ideally my program shouldn't need an installer at all). What other options do I have?

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

Of course it's entirely possible to set up an installer that installs both Python itself and your own... (1 comment)
Of course it's entirely possible to set up an installer that installs both Python itself and your own...
Karl Knechtel‭ wrote 6 months ago

Of course it's entirely possible to set up an installer that installs both Python itself and your own Python code. There are even tools to help with that. But I wanted to focus this Q&A on approaches that involve a seamless user experience, where users don't need to know anything about Python (at least, as long as nothing goes wrong in the code).

While my answer describes existing tools, it's of course possible to take a DIY approach by just emulating what the tools do. Of course, the devil is in the details; but those who want a top-level overview should read the detail section in my answer, and may also be interested in my answer to a related, not-Python-specific question on Programming Language Design & Implementation Stack Exchange.