Skip to content

ModuleNotFoundError when using linuxdeploy-plugin-conda #11

@probonopd

Description

@probonopd

Not sure if this is a linuxdeploy-plugin-conda bug or a bug in the TruFont Python packaging.

Here is my script:

#! /bin/bash

export APPNAME=trufont
export PIP_REQUIREMENTS="$APPNAME"
# export CONDA_PACKAGES="$APPNAME" # Only use this if the app is in a Conda channel (e.g., conda-forge)

wget -c "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
wget -c "https://raw.githubusercontent.com/TheAssassin/linuxdeploy-plugin-conda/master/linuxdeploy-plugin-conda.sh"
chmod +x linuxdeploy-x86_64.AppImage linuxdeploy-plugin-conda.sh

rm -r AppDir || true

cat > $APPNAME.desktop <<EOF
[Desktop Entry]
Version=1.0
Name=TruFont
Exec=trufont %U
Terminal=false
Type=Application
Icon=$APPNAME
Categories=Graphics;
EOF

touch "$APPNAME.svg"
./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin conda -i $(readlink -f "$APPNAME.svg") -d $(readlink -f "$APPNAME.desktop") --output appimage

An AppImage gets generated, but it does not run:

me@host:~$ ./TruFont-x86_64.AppImage 
Traceback (most recent call last):
  File "/tmp/.mount_TruFonZMkCwr/AppRun", line 7, in <module>
    from trufont.__main__ import main
  File "/home/me/AppDir/usr/conda/lib/python3.7/site-packages/trufont/__main__.py", line 1, in <module>
    from defconQt import representationFactories as baseRepresentationFactories
  File "/home/me/AppDir/usr/conda/lib/python3.7/site-packages/defconQt/representationFactories/__init__.py", line 3, in <module>
    from defcon import Glyph, Image, registerRepresentationFactory
  File "/home/me/AppDir/usr/conda/lib/python3.7/site-packages/defcon/__init__.py", line 10, in <module>
    from defcon.objects.font import Font
  File "/home/me/AppDir/usr/conda/lib/python3.7/site-packages/defcon/objects/font.py", line 7, in <module>
    from fontTools.ufoLib import UFOReader, UFOWriter, UFOLibError, UFOFileStructure
  File "/home/me/AppDir/usr/conda/lib/python3.7/site-packages/fontTools/ufoLib/__init__.py", line 9, in <module>
    import fs
ModuleNotFoundError: No module named 'fs'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions