[BUG] Incompatible with `ortools >= 9.4` (`No module named 'ortools.graph.pywrapgraph'`)
See original GitHub issueDescribe 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:
- Created a year ago
- Reactions:2
- Comments:9 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The issue should be resolved with the latest version. Please update the package using
pip install 'k-means-constrained>=0.7.2'
and report backThanks for the rapid fix.