Describe the bug
unable to import mip on a google cloud platform VM instance because of the error module 'mip' has no attribute 'Var'
To Reproduce
I've successfully run mip locally and on google colab. However, when I tried to import mip on a google cloud platform VM instance, I got the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/yl4536/anaconda3/lib/python3.5/site-packages/mip/__init__.py", line 2, in <module>
from mip.solver import Solver
File "/home/yl4536/anaconda3/lib/python3.5/site-packages/mip/solver.py", line 9, in <module>
class Solver:
File "/home/yl4536/anaconda3/lib/python3.5/site-packages/mip/solver.py", line 292, in Solver
e1: Union["mip.LinExpr", "mip.Var"],
File "/home/yl4536/anaconda3/lib/python3.5/typing.py", line 537, in __getitem__
dict(self.__dict__), parameters, _root=True)
File "/home/yl4536/anaconda3/lib/python3.5/typing.py", line 494, in __new__
for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
File "/home/yl4536/anaconda3/lib/python3.5/typing.py", line 494, in <genexpr>
for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
File "/home/yl4536/anaconda3/lib/python3.5/typing.py", line 185, in __subclasscheck__
self._eval_type(globalns, localns)
File "/home/yl4536/anaconda3/lib/python3.5/typing.py", line 172, in _eval_type
eval(self.__forward_code__, globalns, localns),
File "<string>", line 1, in <module>
AttributeError: module 'mip' has no attribute 'Var'
For reference, I set up the VM instance following this tutorial, and installed mip using pip install mip.
Desktop (please complete the following information):
Python version: 3.5.1
Python-MIP version (we recommend you to test with the latest version): 1.12.0
Describe the bug unable to import mip on a google cloud platform VM instance because of the error
module 'mip' has no attribute 'Var'
To Reproduce I've successfully run mip locally and on google colab. However, when I tried to import mip on a google cloud platform VM instance, I got the following error:
For reference, I set up the VM instance following this tutorial, and installed mip using
pip install mip
.Desktop (please complete the following information):