{"id":27268,"library":"py2app","title":"py2app","description":"py2app is a Python setuptools command that allows you to create standalone macOS application bundles (.app) from Python scripts, including all dependencies. The current version is 0.28.10, requiring Python >=3.10. It wraps py2applet and the py2app build command, with recipes for many popular third-party packages.","status":"active","version":"0.28.10","language":"python","source_language":"en","source_url":"https://github.com/ronaldoussoren/py2app","tags":["macos","packaging","setuptools","app-bundle"],"install":[{"cmd":"pip install py2app","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"py2app extends setuptools commands; compatibility issues with setuptools >=82 existed in earlier versions.","package":"setuptools","optional":false}],"imports":[{"note":"py2app is a command extension, not a direct module; the correct import is for internal use.","wrong":"import py2app","symbol":"py2app.command.py2app","correct":"from py2app.command import py2app"}],"quickstart":{"code":"# setup.py\nfrom setuptools import setup\n\nAPP = ['hello.py']\nDATA_FILES = []\nOPTIONS = {}\n\nsetup(\n    app=APP,\n    data_files=DATA_FILES,\n    options={'py2app': OPTIONS},\n    setup_requires=['py2app'],\n)","lang":"python","description":"Minimal setup.py to build a macOS .app from hello.py. Run 'python setup.py py2app' to build."},"warnings":[{"fix":"Move py2app requirement from install_requires to setup_requires.","message":"install_requires in setup() no longer works with py2app. Use setup_requires=['py2app'] instead.","severity":"gotcha","affected_versions":">=0.28.9"},{"fix":"Upgrade to Python 3.10+ or pin py2app to an older version (e.g., <=0.28.8).","message":"py2app requires Python >=3.10 as of 0.28.10. Older versions of Python (including 2.7 and 3.9) are no longer supported.","severity":"breaking","affected_versions":">=0.28.10"},{"fix":"Use standard CPython without free-threading for building apps with py2app.","message":"py2app does not support free-threaded Python (3.13+ with --disable-gil).","severity":"gotcha","affected_versions":">=0.28.9"},{"fix":"Ensure your application does not rely on pkg_resources; modern setuptools uses importlib.resources.","message":"pkg_resources usage is deprecated; fallback only for ancient Python versions.","severity":"deprecated","affected_versions":">=0.28.9"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from py2app.command import py2app' or simply run via setup.py.","cause":"Incorrect import path; py2app is a command, not a library.","error":"ImportError: cannot import name 'log' from 'py2app'"},{"fix":"Upgrade py2app: pip install --upgrade py2app. Minimum 0.28.9 for setuptools >=70.","cause":"Conflict with setuptools version; often due to using older py2app with newer setuptools.","error":"SystemExit: error: option --no-user-cfg not recognized"},{"fix":"Run 'pip install py2app' and ensure 'setup_requires' includes 'py2app' in setup.py.","cause":"py2app not installed in the current environment or not listed in setup_requires.","error":"DistributionNotFound: The 'py2app' distribution was not found"},{"fix":"Check that the path in APP list is a valid .py file.","cause":"The file specified in APP list is not a Python file or does not exist.","error":"ValueError: The 'app' script is not a Python script"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}