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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:21:00+00:00 2026-06-15T10:21:00+00:00

I made a wxPython app for Mac and packaged it with py2app. Two people

  • 0

I made a wxPython app for Mac and packaged it with py2app. Two people have already said they can’t get it to launch, with the following error message:

ImportError: dlopen(/Users/username/Desktop/MCManager.app/Contents/Resources/lib/python2.6/wx/_core_.so, 2): Library not loaded: /usr/lib/libwx_macud-2.8.0.dylib
  Referenced from: /Users/username/Desktop/MCManager.app/Contents/Resources/lib/python2.6/wx/_core_.so
  Reason: image not found

I have only been able to test the app on Mac 10.6.7. Both of the people having the problem are using 10.7.x. Has anyone else had this issue, or know what it means? It seems from the message that it’s trying unsuccessfully to load the wx library, but the wx library should be in the app
s Resources folder, correct?

Here’s my setup file:

#! /usr/bin/env python

import py2app
from setuptools import setup

setup(
    options = dict(
        py2app = dict(
            iconfile = 'MCManager.icns',
            packages = 'wx',
            site_packages = True,
            plist = dict(
                CFBundleName = "MCManager",
                CFBundleShortVersionString = "1.2.2",
                CFBundleGetInfoString = "MCManager 1.2.2",
                CFBundleExecutable = "MCManager",
                CFBundleIdentifier = "net.sourceforge.mcmanager",
            ),
        ),
    ),
    app = ['ScriptUnix.py']
)

I run it with arch -i386 python26 filename.py py2app, (arch because I can’t get Python to run 32-bit without arch, and 2.6 because, very very long story short, I can’t use 2.7 with py2app).

  • 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-06-15T10:21:01+00:00Added an answer on June 15, 2026 at 10:21 am

    The problem is that you’re building a semi-standalone app. As the docs explain in various places, if you’re using a “vendor Python”, meaning any of the Python versions that came pre-installed with OS X, py2app cannot build a standalone app. For example:

    If the –semi-standalone option or a vendor Python is used, then the Python.framework is ignored. All other vendor files (those in /usr/ or /System/ excluding /usr/local/) are also excluded.

    So, it does not package up the wx libraries in /usr/lib, because those are vendor libraries. Instead, it just links to the existing ones. There are no such libraries on a standard OS X 10.7 system. Even if there were, the fact that you end up explicitly linking to the 2.8.0 version from 10.6 means it probably wouldn’t work on later systems.

    What you need to do is to get those wx libraries copied into your .app bundle, and reference them from there. And py2app will not do that for you if you run it with your vendor Python. Which means you have three choices:

    1. Use a separate Python installation.
    2. Trick py2app into building a standalone app anyway, possibly by hacking up the py2app sources.
    3. Bundle the app yourself (or use a different tool).

    The best answer is usually #1. In your comments, you say that you were able to install Python 2.7.3 (presumably from python.org?), and you were able to install py2app for the vendor 2.6, but that you weren’t able to install py2app for the custom 2.7.3. That sounds highly implausible. (If you were able to install 2.7.3 somehow, it should be installed into directories that you have access to.) But, even if it’s true, it doesn’t matter; you can install Python packages into a user-specific site-packages directory, under your home directory. You don’t need admin rights for that. And in fact, most Unix software is designed to work that way.

    An even easier way to do that is to use virtualenv. Yes, I know, you can’t install it, but you don’t have to. If you read the docs, there’s even a whole set of instructions on how to bootstrap a virtualenv on a system where you can’t install anything. The result is your own personal Python installation, based on the system 2.7.3, but that you have total control over. So you can install py2app there. (There are a few notes about using py2app and virtualenv together, which you should read about in the py2app docs.)

    If you can’t or won’t do any of those things, then py2app can’t do what you want, at least not out of the box. But it’s open source. And there are even comments in the source explaining why it doesn’t try to make standalone builds from system Python. And most of the really tricky stuff is separated out into separate packages (like macholib and altgraph), so you should be able to understand py2app itself, well enough to hack together a standalone package that works for your specific app. (That’s a lot easier than modifying p2app to fix the underlying problem in a fully general way.)

    Or you could look at other tools that do similar things as py2app. Try searching PyPI for py2app or freeze and see what comes up. You can generally install packages into your home directory, or run them without installing them, so start playing with whatever looks promising and see if it solves your problem.

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

Sidebar

Related Questions

I've got a wxPython app that I made into an app using py2app. It's
I have just made a small little app of a Python wxPython script with
Made the upgrade to Mac OS X 10.8 (Mountain Lion) and get now the
I made a function in my wxpython app that pop up a passwordbox. The
I've made a .app with my WxPython script, and it's just about finished. The
I made an iphone app to capture image from camera and to set that
I made a Web service in which I have a function to count some
I made a UITableViewCell and I have 20 rows in that table in which
Coming from this question , I have a wxComboCtrl with a custom popup made
I'm very new to Python in general, but I made an app in Python

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.