coin-or / python-mip

Python-MIP: collection of Python tools for the modeling and solution of Mixed-Integer Linear programs
Eclipse Public License 2.0
527 stars 92 forks source link

CBC not found #60

Closed ftxi closed 4 years ago

ftxi commented 4 years ago

I just managed to install mip for plain python 3.8.1 on windows (via pip install mip). Trying a simple test yields the following error:

C:\Users\user>python
Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 22:39:24) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from mip import *
Using Python-MIP package version 1.7.2
>>> m = Model()
cbc not found
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\mip\model.py", line 119, in __init__
    from mip.cbc import SolverCbc
  File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\mip\cbc.py", line 455, in <module>
    Osi_getNumCols = cbclib.Osi_getNumCols
NameError: name 'cbclib' is not defined

I assumed that CBC is included with mip, as stated in

The default installation includes pre-compiled libraries of the MIP Solver CBC for Windows, Linux and MacOS. If you have the commercial solver Gurobi installed in your computer, Python-MIP will automatically use it as long as it finds the Gurobi dynamic loadable library. Gurobi is free for academic use and has an outstanding performance for solving MIPs. Instructions to make it accessible on different operating systems are included bellow.

I have no idea why this happens, and got no hint to solve this problem. What's wrong?

h-g-s commented 4 years ago

Try python 64 bits, we dropped support for 32 bits.

Em qui, 20 de fev de 2020 23:03, sclereid notifications@github.com escreveu:

I just managed to install mip for plain python 3.8.1 on windows (via pip install mip). Trying a simple test yields the following error:

C:\Users\user>python Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 22:39:24) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.>>> from mip import * Using Python-MIP package version 1.7.2>>> m = Model() cbc not found Traceback (most recent call last): File "", line 1, in File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\mip\model.py", line 119, in init from mip.cbc import SolverCbc File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\mip\cbc.py", line 455, in Osi_getNumCols = cbclib.Osi_getNumColsNameError: name 'cbclib' is not defined

I assumed that CBC is included with mip, as stated in

The default installation includes pre-compiled libraries of the MIP Solver CBC for Windows, Linux and MacOS. If you have the commercial solver Gurobi installed in your computer, Python-MIP will automatically use it as long as it finds the Gurobi dynamic loadable library. Gurobi is free for academic use and has an outstanding performance for solving MIPs. Instructions to make it accessible on different operating systems are included bellow.

I have no idea why this happens, and got no hint to solve this problem. What's wrong?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/coin-or/python-mip/issues/60?email_source=notifications&email_token=AB4VZOU2DGQICLWJDSB3B4LRD4Y6NA5CNFSM4KY2TKX2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IPFQ4GA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4VZORP5TYX2WQ5WQHYY3TRD4Y6NANCNFSM4KY2TKXQ .

ftxi commented 4 years ago

Try python 64 bits, we dropped support for 32 bits. Em qui, 20 de fev de 2020 23:03, sclereid notifications@github.com escreveu:

Thanks, I reinstalled python and it works now.