Third party libraries with HLAs

Hi Scarzer,

Thank you for the kind words! We don’t currently have a supported way of installing Python dependencies. This is made harder on Linux, as you discovered, by the fact that the AppImage installs to a separate temporary directory each run.

For an easier workaround in the meantime, you can modify the sys.path in your extension file to include the directory that you installed the Python package to:

import sys
MY_ADDITIONAL_PACKAGES_PATH = '/packages/install/location'
if MY_ADDITIONAL_PACKAGES_PATH not in sys.path:
    sys.path.append(MY_ADDITIONAL_PACKAGES_PATH)

import protobuf

Note that ‘/packages/install/location’ is the directory where you installed the packages, not the path to the package itself. So in the protobuf case, it should contain a folder with the name ‘protobuf’ containing the package’s Python files.

An extension that uses the package in this way will unfortunately not work if added to the marketplace at the moment. We’ll likely support installing package dependencies at the extension level either via a standard setup.py or requirements.txt in the future.

Best,
John