Python-MIP and solver HiGHS

23 views
Skip to first unread message

Mateus Santana

unread,
Dec 3, 2024, 9:17:49 PM12/3/24
to Python-MIP
Hi guys!

I'm trying to use the solver HiGHS while implementing my model using Pyhton-MIP, but I'm having some issues. Although I already installed e reinstalled the solver in several ways (like via pip install highspy or via source code), I keep getting this error message:

FileNotFoundError: HiGHS not found.Please install the `highspy` package, orset the `PMIP_HIGHS_LIBRARY` environment variable.

when I declare my model:
from mip import *
import highspy
highspy.Highs()
model = mip.Model(sense=MINIMIZE, solver_name='highs')

I would like to know if someone already had this issue and could help me solving it, please.

Thank you so much!

Luciano Rigolin de Almeida

unread,
Dec 4, 2024, 3:18:42 AM12/4/24
to Mateus Santana, Python-MIP
Hi.

The error appears to be saying that the PMIP_HIGHS_LIBRARY environment variable is not set. Have you set this variable?

Att,

Luciano Rigolin

--
You received this message because you are subscribed to the Google Groups "Python-MIP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-mip+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/python-mip/599fd3b5-4b1d-4912-9cf2-15a19d2228f2n%40googlegroups.com.

Mateus Santana

unread,
Dec 4, 2024, 6:03:46 PM12/4/24
to Python-MIP

Good evening, Luciano. Thank you for your reply!

I have tried different values for this environment variable. Initially, I set the variable to the same path where I installed HiGHS, following their instructions (Getting started · HiGHS Documentation). However, it didn’t work. I then tried different paths for the variable, such as the build\bin folder and its adjacent directories, but I still haven’t been able to connect the library to HiGHS.

It might be an issue with the solver itself (I also contacted their team but haven’t received a response yet). What’s strange, though, is that I didn’t encounter any similar issues when using Pyomo.

Could the problem be that I’m setting the wrong path for the variable?

Luciano Rigolin de Almeida

unread,
Dec 5, 2024, 3:01:03 AM12/5/24
to Mateus Santana, Python-MIP
Bom dia.

Não sei mesmo. Pode ser mesmo um problema no Python-MIP. Já usei o Python-MIP com o solver Gurobi e foi com sucesso.

Já com o HiGHS, nunca usei, nem sabia que dava.

=================================================

Good morning.

I really don't know. It could be a problem with Python-MIP. I've used Python-MIP with the Gurobi solver before and it was successful.

I've never used HiGHS, and I didn't even know it worked.

Reply all
Reply to author
Forward
0 new messages