I am very new to Python an OR-Tools, so please excuse the simplicity of my question.
I installed OR-Tools by executing ortools-6.7.4973.win-amd64-py3.6.exe on my 64-bit, Win10 machine.
When I try to execute from ortools.constraint_solver import pywrapcp in the command prompt of Spyder, I get the error No module named 'ortools'.
What am I doing wrong? Thanks in advance!
Most likely, you need to install visual studio 2017 redistributables c++
libraries.
https://aka.ms/vs/15/release/VC_redist.x64.exe
Please also make sure the python you are using is 64 bit.
Can you try?
Laurent Perron | Operations Research | [email protected] | (33) 1 42 68 53
00
Le mer. 27 juin 2018 à 10:35, uioplmn notifications@github.com a écrit :
I am very new to Python an OR-Tools, so please excuse the simplicity of my
question.
I installed OR-Tools by executing ortools-6.7.4973.win-amd64-py3.6.exe on
my 64-bit, Win10 machine.
When I try to execute from ortools.constraint_solver import pywrapcp in
the command prompt of Spyder, I get the error No module named 'ortools'.
What am I doing wrong? Thanks in advance!—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/737, or mute the thread
https://github.com/notifications/unsubscribe-auth/AKj17RBljjMXdFD-HZrQMQxoRpWCPcchks5uA0O4gaJpZM4U5R2x
.
Check your python with:
python --version
python -c "import platform; print(platform.architecture()[0])"
python -m pip --version
note: pip should be installed with python if you have used the official python.org installer
note: I assume you have added python.exe to your PATH.
You should also install ortools using:
python -m pip install -U --user ortools
and check installation using
python -m pip show ortools
ps: you have installed ortools for python3.6 be sure to use the same python interpreter or use the install method above....
pps: Are you sure Spyder use python3.6 ?
Checking python -c "import platform; print(platform.architecture()[0])" showed that I had, indeed, a 32-bit version installed. Installing the 64-bit version and re-installing ortools using python -m pip install -U --user ortools did the trick. Many thanks to both of you, @lperron and @Mizux!
I had the same issue. Like @Iperron mentioned it is usually caused due to missing Microsoft Visual Studio 20** redistributables c++.
This is how I solved it.
I'll try to add the Redistributable in the installation doc (#1872)
Most helpful comment
Most likely, you need to install visual studio 2017 redistributables c++
libraries.
https://aka.ms/vs/15/release/VC_redist.x64.exe
Please also make sure the python you are using is 64 bit.
Can you try?
Laurent Perron | Operations Research | [email protected] | (33) 1 42 68 53
00
Le mer. 27 juin 2018 à 10:35, uioplmn notifications@github.com a écrit :