To build an AppImage from a Python application you will need to bundle every single dependency (including the Python interpreter). To achieve this we will use conda, a “package , dependency and environment management for any language”. Also we will use linuxdeploy and its plugin for conda.

You can find the whole template project here

Building the AppDir

To create an AppImage you will need to create following files:

Desktop Entry

[Desktop Entry]
Comment=Template Python Application %F

This must be deployed into AppDir/usr/share/applications/net.developer.myappname.desktop. It’s recommended to use the reverse domain notation for the desktop entry name as this will be used as application id.


The application icon must be deployed to AppDir/usr/share/icons/hicolor/scalable/application-icon.svg if it’s a vector image otherwise it should be deployed in the folder corresponding to its size. For more details please check the FreeDesktop Icon Theme Specification.

Notice that the icon name specified in the desktop entry must match the file name without the file extension.

Launcher script

# -*- coding: utf-8 -*-

APPDIR=`dirname $0`
${APPDIR}/usr/conda/bin/python ${APPDIR}/usr/bin/ $@

This is an small wrapper to ensure our app (in this case is executed used the embed Python distribution.

It must be deployed to AppDir/AppRun.

Generating the AppImage

To generate the AppImage from the AppDir we will use linuxdeploy and its plugin for conda. It requires two input environment variables: CONDA_CHANNELS and CONDA_PACKAGES, there you will specify your package dependencies as follows:

export CONDA_CHANNELS=mychannel;myotherchannel
export CONDA_PACKAGES=mypackage;myotherpackage

You can find for conda packages here:

Finally linuxdeploy will be called as follows:

linuxdeploy --appdir=AppDir --plugin conda --output appimage

Build pipeline

## AppImage
  image: conanio/gcc48:1.14.3
  stage: build
    # Upgrade Conan version
    - sudo pip install --upgrade conan
    # Automatic detection of your arch, compiler, etc.
    - conan user
    # Add AppImage specific repositories
    - conan remote add appimage-conan-community --insert=0
    # Prepare build environment
    - conan install .
    # download linuxdeploy conda plugin
    - wget -qnc
    - chmod +x

    # create AppDir
    - install -D -m 755 src/ AppDir/AppRun
    - install -D -m 755 src/ AppDir/usr/bin/
    - install -D -m 644 res/appimage_logo.png AppDir/usr/share/icons/hicolor/256x256/apps/appimage_logo.png
    - install -D -m 644 res/net.azubieta.python_appimage_template.desktop AppDir/usr/share/applications/net.azubieta.python_appimage_template.desktop

    # build the AppImage
    - .
    - export CONDA_CHANNELS=conda-forge
    - export CONDA_PACKAGES=pyfiglet
    - linuxdeploy --appdir=AppDir --plugin conda --output appimage
    - .

      - python_appimage_template*.AppImage*


Once the build is done you can find the resulting file in the jobs artifacts view.

You may also want to get a reference to the latest produced artifact in order to show it in your applications site downloads page or in the pling product page. Use the following snippet to get your own download link address:

"<user name>/<project name>/-/jobs/artifacts/master/raw/<artifact file path>?job=<job name>"

Be sure to replace the user name, project name, artifact file path, and job name.