You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have installed the latest version of MICOM (through pip) and have been unsuccessful in importing it. Interestingly, after installing MICOM, importing Cobra by itself also yields the same error. Any help with this?
Code Sample
importmicom
OSQP and HIGHS are available but could not load the hybrid interface.
Traceback (most recent call last):
File "/Users/shahad/PycharmProjects/pythonProject/.venv/lib/python3.12/site-packages/optlang/__init__.py", line 61, in <module>
from optlang import hybrid_interface
File "/Users/shahad/PycharmProjects/pythonProject/.venv/lib/python3.12/site-packages/optlang/hybrid_interface.py", line 26, in <module>
import optlang.matrix_interface as mi
File "/Users/shahad/PycharmProjects/pythonProject/.venv/lib/python3.12/site-packages/optlang/matrix_interface.py", line 40, in <module>
from numpy import Infinity, array, concatenate, zeros
ImportError: cannot import name 'Infinity' from 'numpy' (/Users/shahad/PycharmProjects/pythonProject/.venv/lib/python3.12/site-packages/numpy/__init__.py). Did you mean: 'isfinite'?
..
Process finished with exit code 0
Context
Python 3.12.3
micom 0.35.0
cobra 0.29
The text was updated successfully, but these errors were encountered:
It's an incompatibility with numpy 2.0. It's already fixed in opencobra/optlang#266 and there should be a new optlang release soon. For now, downgrading numpy to <2.0 should work.
cdiener
changed the title
Possible incompatibility with HIGHS and OSQP?
Hybrid solver broken for numpy 2.0+
Jul 22, 2024
Problem description
Hello,
I have installed the latest version of MICOM (through pip) and have been unsuccessful in importing it. Interestingly, after installing MICOM, importing Cobra by itself also yields the same error. Any help with this?
Code Sample
Context
The text was updated successfully, but these errors were encountered: