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 6739285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:28:09+00:00 2026-05-26T11:28:09+00:00

My script that I’m trying to create into an executable contains the following imports:

  • 0

My script that I’m trying to create into an executable contains the following imports:

import csv, time, BeautifulSoup, sys, mechanize, os, traceback, win32com.client as win32

My setup.py looks like this:

from distutils.core import setup
import py2exe, sys, os

sys.argv.append('py2exe')

setup(
    options = {'py2exe': {'bundle_files': 1}},
    console = [{'script': "tool.py"}],
    zipfile = None,
)

The .exe of my program is created successfully, however when I try to run it I receive the following errors:

Traceback (most recent call last):
  File "tool.py", line 1, in <module>
  File "zipextimporter.pyc", line 82, in load_module
  File "win32com\__init__.pyc", line 5, in <module>
  File "zipextimporter.pyc", line 98, in load_module
ImportError: MemoryLoadLibrary failed loading win32api.pyd

Surprisingly, it compiles into an .exe fine if I use bundle_files: = 3 however I need this program to be in one executable, not multiple files. I’ve read this from the py2exe website but I’m not sure if that’s what I need to do/use. If that is the answer I’m looking for, I don’t know how to use that or what to do with it. Please explain.

Any help is greatly appreciated!

  • 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-26T11:28:10+00:00Added an answer on May 26, 2026 at 11:28 am

    This was solved by upgrading to Python 2.7. I originally had Python 2.6 installed but the update solved this issue.

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

Sidebar

Related Questions

I have the following script that I want to insert into a table, but
I have the following script that loads a page into a div and not
I have a SQL script that will insert a long string into a table.
The Perl script that contains a Unix command to grep the ethernet NICs cannot
I have a little script that compiles a markdown file into html, and inserts
I have a custom script that outputs a list of particular products in csv
I have a script that takes a lot of time to complete. Instead of
I have the following script that is working great, but I want to wrap
I have the following script that dumps a given array's contents function dump(obj) {
I have a script that parses the filenames of TV episodes (show.name.s01e02.avi for example),

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.