Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Name 'cbclib' is not defined

Open
#335 21 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
tooling

Research direction

Reproduce the reported snippet on Windows with Python 3.10, then inspect mip/cbc.py around the cbclib reference at line 603 and the module import path shown in the traceback. Trace why cbclib is unavailable and verify that creating Model("test", solver_name=CBC) completes without the reported NameError.

Written by the indexing model from the issue text.

Description

cbc help wanted

Describe the bug

I cannot solve even a very simple program, because the system claims that cbclib is not defined:

Traceback (most recent call last):
  File "test_mip.py", line 2, in <module>
    m = Model("test", solver_name=CBC)
  File "local-packages\Python310\site-packages\mip\model.py", line 87, in __init__
    import mip.cbc
  File "local-packages\Python310\site-packages\mip\cbc.py", line 603, in <module>
    Osi_getNumCols = cbclib.Osi_getNumCols
NameError: name 'cbclib' is not defined

To Reproduce

from mip import Model, CBC
m = Model("test", solver_name=CBC)

Expected behavior
No error.

Desktop (please complete the following information):

  • Windows 11 22H2
  • Python version: 3.10.10
  • Python-MIP version (we recommend you to test with the latest version): 1.15.0 (also exists in 1.14.0)
Dominant language
Linear Programming
Stars
601
Forks
108
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from coin-or/python-mip

All issues in coin-or/python-mip

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.