Giter Site home page Giter Site logo

appimage-builder-python-example's Introduction

Python AppImage packaging example

This project contains an appimage-builder recipe for a Python3 application. To recreate the package use a modern Debian/Ubuntu system and appimage-builder.

Instructions

Packaging a Python3 application into an AppImage is quite similar to packaging a regular compiled application. Just a few adjustments are required:

  1. Use the Python main binary as entry point: exec: usr/bin/python3

  2. Install the pip requirements using the AppDir as root: python3 -m pip install --root=AppDir -r ./requirements.txt

  3. Set the PYTHONHOME environment variable in the AppImage runtime: PYTHONHOME: '${APPDIR}/usr'

  4. Copy your app source code into the AppDir: cp ./src AppDir/usr -r

That's all!

Check the appimage-builder.yml file for the complete recipe.

appimage-builder-python-example's People

Contributors

azubieta avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

appimage-builder-python-example's Issues

ModuleNotFoundError: No module named 'pyfiglet'

I clone your repo and run

appimage-builder --recipe appimage-builder.yml

I get the error: ModuleNotFoundError: No module named 'pyfiglet'.

But the requirements.txt contains pyfiglet and the logs are

Requirement already satisfied: pyfiglet in /home/ikreb/.local/lib/python3.8/site-packages (from -r ./requirements.txt (line 1)) (0.8.post1)

Then I uninstalled the module pyfiglet and got this log message:

 Installing collected packages: pyfiglet
 WARNING: The script pyfiglet is installed in 'AppDir/home/ikreb/.local/bin' which is not on PATH.
 Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
 Successfully installed pyfiglet-0.8.post1

But also if I add ${APPDIR}/home/ikreb/.local/bin to the PATH variable, it doesn't help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.