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

  • SEARCH
  • Home
  • 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 7093817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:29:12+00:00 2026-05-28T08:29:12+00:00

I wrote a fairly simple GUI program to automate a few processes for Windows

  • 0

I wrote a fairly simple GUI program to automate a few processes for Windows users in Python (as it is the only programming language I am somewhat familiar with that will run on Windows). I would ideally not want the user to have to run an install program on their machine, as my plan is for it to run self-contained in a USB drive.

It depends on os, shutil, string, sys, tkinter, webbrowser, PIL, ftplib, and glob.

It seems as though all of the dependencies got imported when I ran cx_freeze on it, except for PIL. I have never used cx_freeze before, so I could be doing something wrong but it doesn’t seem like it. Running the program from the unfrozen .py script works just fine.

Here’s the error message I receive when trying to use a PIL command:

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Python32\lib\tkinter\__init__.py", line 1399, in __call__
    return self.func(*args)
  File "E:\AlbumUploader.py", line 143, in OnButton2Click
    img.thumbnail(size, Image.ANTIALIAS)
  File "C:\Python32\lib\site-packages\PIL\Image.py", line 1573, in thumbnail
    self.load()
  File "C:\Python32\lib\site-packages\PIL\ImageFile.py", line 168, in load
    self.load_prepare()
  File "C:\Python32\lib\site-packages\PIL\ImageFile.py", line 234, in load_prepare
    self.im = Image.core.new(self.mode, self.size)
  File "C:\Python32\lib\site-packages\PIL\Image.py", line 39, in __getattr__
    raise ImportError("The _imaging C module is not installed")
ImportError: The _imaging C module is not installed

Thanks for any help you can provide. I see that it’s still referencing C:\Python32 which could be part of the problem, because it shouldn’t be (if I’m not mistaken).

Update:

I looked at the PIL FAQ and it seems like the gist of that answer is that I need to make sure my sys.path list is correct. I basically grabbed all the Python files for Windows and included it in the USB drive which I am trying to use to contain everything, and set my path like so:

program_dir = os.path.split(sys.argv[0])[0]
sys.path = [program_dir]
sys.path.append(program_dir + os.sep + 'Lib')
sys.path.append(program_dir + os.sep + 'Lib' + os.sep + 'site-packages')
sys.path.append(program_dir + os.sep + 'Lib' + os.sep + 'site-packages' + os.sep + 'PIL')
sys.path.append(program_dir + os.sep + 'DLLs')

All the paths seem correct, but for some reason I am still getting the same error. When I run the .py file everything works 100%, but this seems to break it somehow. Other modules seem to work just fine like shutil, os, and sys, for example.

  • 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-28T08:29:13+00:00Added an answer on May 28, 2026 at 8:29 am

    I think your main problem may be that the Python Imaging Library (PIL) does not yet support Python 3.x.

    If you look at the PIL downloads page you’ll see that there are Windows downloads for Python 2.4, 2.5, 2.6 and 2.7 but nothing for Python 3.x.

    This question has an answer which details unofficial ports of PIL for Python 3.x which might be worth a try.

    If that works you could take a look at the first question on the PIL FAQ which is about the “The _imaging C module is not installed” error and lists various things you can do to identify the problem.

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

Sidebar

Related Questions

I wrote a quick program in python to add a gtk GUI to a
Suppose I would like to write a fairly simple programming language, and I want
I wrote this simple Prolog program. man(socrates). mortal(X) :- man(X). immortal(X) :- immortal(X). I
I'd like to write a fairly simple server-side virtual filesystem in either Python (preferably)
I am writing a fairly simple Django application where users can enter string queries.
Hey, I recently wrote this fairly simple game of life in JavaScript. Within this
I wrote this fairly simple MDX request to get the rank by sales count
I wrote a simple batch file as a PowerShell script, and I am getting
I wrote a windows service using VB that read some legacy data from Visual
I wrote a simple tool to generate a DBUnit XML dataset using queries that

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.