Runtime
All --python-* options are handled by the appimage module before your application sees any arguments.
Runtime options
Option |
Description |
|---|---|
|
Show available |
|
Set the default entry point to start. Used in AppRun. |
|
Start the bundled Python interpreter interactively. |
|
Run a specific console script or |
|
List all available console script entry points and exit. |
|
Print startup debug information to stderr. |
Any argument not starting with --python- is passed through unchanged to the application.
Accessing the bundled Python
# Interactive interpreter
./myapp-x86_64.AppImage --python-interpreter
# Run a script
./myapp-x86_64.AppImage --python-interpreter script.py
# Run a module (e.g. pip)
./myapp-x86_64.AppImage --python-interpreter -m pip list
# Run a specific entry point
./myapp-x86_64.AppImage --python-entry-point myapp.cli:main
Virtual environments
The --python-interpreter -m venv option creates a virtual environment whose python3 symlink points to the AppImage itself. This makes all packages bundled in the AppImage available in the virtual environment, and allows installing additional packages on top:
# Create the virtual environment
./myapp-x86_64.AppImage --python-interpreter -m venv ~/.venv/myapp
# Install additional packages
~/.venv/myapp/bin/pip install extra-package
# Run the application via the virtual environment
~/.venv/myapp/bin/myapp
When invoked through a virtual environment symlink, the appimage module automatically activates the correct environment so that packages installed into it take precedence.
Supported venv options
Option |
Description |
|---|---|
|
Delete the environment directory before creation if it already exists. |
|
Update an existing venv after the AppImage has been replaced with a newer version. |
|
Set an alternative shell prompt prefix for the environment. |
|
Skip creating |
Note:
--system-site-packageshas no effect — the AppImage’s bundled packages are always accessible regardless, because Python finds them via its compiled-insys.prefix(APPDIR/python/), not through the venv’spyvenv.cfg.--copies,--upgrade-deps,--without-pip, and--symlinksare also not supported.
Extracted AppImages (no FUSE)
On systems where FUSE is not available (some containers, CI environments), an AppImage can be extracted and run directly:
./myapp-x86_64.AppImage --appimage-extract
./squashfs-root/AppRun
The AppRun script detects whether a squashfs-root directory exists next to the original AppImage file and uses it automatically as the application directory.