executable-application
raw JSON → 0.3.0 verified Fri May 01 auth: no python
A minimal example of an executable Python application packaged with setuptools. Current version 0.3.0, released infrequently. Intended for demonstration and learning purposes, not for production use.
pip install executable-application Common errors
error ModuleNotFoundError: No module named 'executable-application' ↓
cause Attempting to import the package using the hyphenated PyPI name instead of the underscore module name.
fix
Use 'import executable_application' (underscore) instead of 'executable-application'.
error ImportError: cannot import name 'main' from 'executable_application' ↓
cause Older versions of the package (pre-0.3.0) may not have the main function exposed at the top level.
fix
Upgrade to version 0.3.0 or later: pip install --upgrade executable-application.
Warnings
gotcha The package name on PyPI contains a hyphen (executable-application), but the Python import uses an underscore (executable_application). This is a common source of confusion. ↓
fix Use 'executable_application' in import statements.
deprecated As of version 0.3.0, there is no official CLI entry point; the package only provides a main() function. ↓
fix Call from Python code: from executable_application import main; main().
Imports
- main wrong
import executable_applicationcorrectfrom executable_application import main - executable_application wrong
import executable-applicationcorrectimport executable_application
Quickstart
from executable_application import main
if __name__ == '__main__':
main()