[BUG] Incompatible with `ortools >= 9.4` (`No module named 'ortools.graph.pywrapgraph'`)

See original GitHub issue

Describe the bug k-means-constrained is incompatible with ortools version 9.4+

Minimum working example from k_means_constrained import KMeansConstrained

Results in:

...
    from k_means_constrained import KMeansConstrained
  File "/home/ubuntu/hbx/python/lib/python3.8/site-packages/k_means_constrained/__init__.py", line 4, in <module>
    from .k_means_constrained_ import KMeansConstrained
  File "/home/ubuntu/hbx/python/lib/python3.8/site-packages/k_means_constrained/k_means_constrained_.py", line 29, in <module>
    from k_means_constrained.mincostflow_vectorized import SimpleMinCostFlowVectorized
  File "/home/ubuntu/hbx/python/lib/python3.8/site-packages/k_means_constrained/mincostflow_vectorized.py", line 4, in <module>
    from ortools.graph.pywrapgraph import SimpleMinCostFlow
ModuleNotFoundError: No module named 'ortools.graph.pywrapgraph'

Versions:

  • Python: Python 3.8.10
  • Operating system: Linux
  • k-means-constrained: k-means-constrained==0.5.1
  • numpy: numpy==1.23.1
  • scipy: scipy==1.8.1
  • ortools: ortools==9.4.1874
  • joblib: joblib==1.1.0
  • cython (if installed):

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
joshlkcommented, Sep 5, 2022

The issue should be resolved with the latest version. Please update the package using pip install 'k-means-constrained>=0.7.2' and report back

0reactions
lperroncommented, Sep 9, 2022

Thanks for the rapid fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No module named 'ortools.graph.pywrapgraph' - Stack Overflow
Solve the No module named 'ortools.graph.pywrapgraph' error message by installing ortools version 9.3.10497 with the following command:
Read more >
No module named 'ortools' · Issue #737 · google/or-tools
When I try to execute from ortools.constraint_solver import pywrapcp in the command prompt of Spyder, I get the error No module named ......
Read more >
OR-Tools Release Notes - Google Developers
This page lists changes to OR-Tools, including new features, bug fixes, and improvements to the code and installation procedures.
Read more >
How to Fix Module Not Found Error 'ortools' - Finxter
This article shows you how to solve the ImportError or ModuleNotFoundError: No module named 'ortools' if you want to use Google's optimization toolset...
Read more >
ortools Changelog - pyup.io
Split `ortools.graph.pywrapgraph` into: ... making the python API PEP 8 compliant (using snake_case names). ... Fix UNSAT bug in presolve (see 1908)
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found