Install plugin dependency from Git URL

Now that pip no longer supports package dependency links, is there a way to install a dependency from an arbitrary URL (e.g. a Git URL)?

I'm trying to override a stale PyPi package that has broken support for Python3 with one which works, but struggling.

Could you use a git submodule in some way?

Edit: BTW, this is one I want to listen in on, since I want to use my fork of a dependency that has some patched bugs, from PRs that have not yet been merged.

Last I remember discussing this with Gina it's not possible, but not sure if anything has changed since then. We had discussed running our own OctoPrint wheel for this kind of stuff but without someone to manage that stuff and handle the hosting, etc. it's not much hope there I'm afraid.

I decided to make the pre-req Python package installation the user's job. I've included instructions on how to work around the dependency problems in the documentation, and the plugin itself will display a pre-req status screen showing if the required package was installed or not.

It wasn't too hard - I used a try; catch on the package import, and in the exception handling I set a setting indicating if the package import failed. The UI then picks this up in an observable and displays the status.

If the Python pre-req isn't available the plugin still loads and shows a different icon in red.

1 Like

Nice solution @benlye