Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 964959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:55:02+00:00 2026-05-16T01:55:02+00:00

I want to package a Python script so that it can run as a

  • 0

I want to package a Python script so that it can run as a standalone program on Windows XP and later Windows versions. Now to do this I’m pretty sure I’ll have to convert it to an .exe file. I know methods exist, what is the easiest/best method?

Now this is where the question gets a little more advanced. I also have some modules the program needs in order to run, can I/how do I package those so that my program can utilize them?

All the modules (if it matters):

import Tkinter
import time
import re
import pickle
import win32api

from win32api import GetSystemMetrics
from PIL import Image, ImageTk
from time import sleep

Next my program also uses PIL in order to display images used in my custom GUI. The thing here is that in order to get the image to run I have to have the complete file path. I have no idea how I’d get this file path on someone else’s computer. In short the program requires .png files how do I transfer them so that the program can properly utilize them?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T01:55:03+00:00Added an answer on May 16, 2026 at 1:55 am

    Take a look at py2exe. It’s not perfect, but it will convert your script and all dependencies into an executable. I haven’t used it in a while, but I believe it makes a directory of dependencies in the directory of the executable. I suspect that you could change the png to a relative path and put it in that directory.

    Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want an app or python package that can 1.Dynamically add python script to
I want to install this python package: http://pypi.python.org/pypi/netifaces/0.5 But I don't know how and
My sytem: Windows, Python 2.7 I downloaded a package and want to include it
I want to package a piece of code that absolutely must run on Java
I want to write some python package installing script in Python into virtualenv. I
I have a Python script that I'd like to compile into a Windows executable.
I am writing a python package (svnplot). I want to copy a shell script
I was looking for a portable script or command line program that can synchronize
I have a Python script that I want to use as a controller to
So, I want to run a Python program with a home-directory install of PyProj

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.