from __future__ import print_function
from ortools.linear_solver import pywraplp
Traceback (most recent call last):
File "simple_ortools_example.py", line 2, in <module>
from ortools.linear_solver import pywraplp
ImportError: No module named ortools.linear_solver
--
You received this message because you are subscribed to the Google Groups "or-tools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/or-tools-discuss/1b51db3a-ece0-4a48-9574-ea5126a08819%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
pip install ortools==6.7.4973
Can you try installing an official python version (not anaconda) and try it with this ?
Le lun. 20 mai 2019 à 15:47, Karl Schelhammer <karl.sc...@gmail.com> a écrit :
Hi Folks,--I have posted about this a few other places:Basically, I'm getting an error when I try to load any module contained by the library. The base module is there but doesn't seem to contain all the classes/methods. Someone suggested checking to see if conda was 64 bit which it is. Otherwise I'm kind of at a loss. Any suggestion as to what to try next would be a huge help.from __future__ import print_function from ortools.linear_solver import pywraplp Traceback (most recent call last): File "simple_ortools_example.py", line 2, in <module> from ortools.linear_solver import pywraplp ImportError: No module named ortools.linear_solver
You received this message because you are subscribed to the Google Groups "or-tools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to or-tools...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/or-tools-discuss/e197303f-d5d8-467c-aa53-b78f49127a08%40googlegroups.com.
./bin/python3.7 -m pip install ortools
Collecting ortools
Collecting protobuf>=3.7.1 (from ortools)
Requirement already satisfied: six>=1.10 in ./lib/python3.7/site-packages (from ortools) (1.12.0)
Requirement already satisfied: setuptools in ./lib/python3.7/site-packages (from protobuf>=3.7.1->ortools) (40.8.0)
Installing collected packages: protobuf, ortools
Successfully installed ortools-7.1.6720 protobuf-3.7.1
anaconda3$ ./bin/python3.7 ~/Work/or-tools/examples/python/integer_programming.py
---- Integer programming example with CBC (natural language API) -----
Number of variables = 2
Number of constraints = 1
Problem solved in 7.000000 milliseconds
Optimal objective value = 6.000000
x1 = 6.000000
x2 = 0.000000
Advanced usage:
Problem solved in 0 branch-and-bound nodes
---- Integer programming example with CBC (C++ style API) -----
Number of variables = 2
Number of constraints = 1
Problem solved in 3.000000 milliseconds
Optimal objective value = 6.000000
x1 = 6.000000
x2 = 0.000000
Advanced usage:
Problem solved in 0 branch-and-bound nodes