Using a solver that has to be installed on my venv

Hi Dev team,

During the publishing of my first app i noticed this line specifically:

INFO: Encountered virtual environment 'venv' in app folder. The virtual environment folder is excluded from file upload.

Which will probably give me some trouble when my first problem is resolved (
My App uses a solver (GLPK) which is initiated by the python Pyomo Package. I had to install this in my Venv using :
conda install -c conda-forge glpk

Would you have any suggestions how i could install something like this for an published app?
Unfortunately i can’t add β€˜glpk’ in the requirements because it is not a pyhton package but an Binary Package.

Kind Regards,

Hi Nino,

You have spotted this well! It is unfortunately not (yet) possible to use Python packages that have system packages as dependencies. We are, however, looking into addressing this limitation.

In the meantime, is it possible to use another optimization package such as SciPy? Another workaround would be to use a worker for the calculation.

Hi Marcel!

Thanks for your quick response!
That is unfortunate, i guess SciPy has a MILP and LP solver module too, would have to rewrite quite some code though.
Also i am not really familiair with the workers concept, and after a quick scan through the link you provided it seems quite complicated.
Would you recommend one of the two routes? :sweat_smile:

I would definitely recommend using Scipy, as this does not require you to arrange a server or other machine on which to run the calculation.

1 Like

We recently released functionality to install system dependencies for your published app. In this case this means that you should be able to use glpk. Please have a look at our documentation on how to use this feature: Development tools & tips - Use system dependencies | VIKTOR Documentation