Google OR-Tools Installation Windows 10 - Python 2.7 64bit

821 views
Skip to first unread message

Jonathan

unread,
Jul 18, 2017, 12:50:56 PM7/18/17
to or-tools-discuss
Hi everyone,

I am trying to install Google OR-Tools on a Windows machine with Python 2.7 (for convenience as the example are written in 2.7).

Could you provide some .exe files ?

I've tried installing it using the binary without success make install: doesn't exist 

I've tried installing it using the source files. I am getting the following error:makesfiles/Makefile.port:130: "Unrecognized visual studio version"... (see picture)

I was using the Developer Command Prompt for VS 2017.

Thanks in advance for your help,
Jonathan



error_install.png

Jonathan

unread,
Jul 18, 2017, 12:54:24 PM7/18/17
to or-tools-discuss
I am trying to install or-tools-6.0 (downloaded from https://github.com/google/or-tools/archive/v6.0.zip

Laurent Perron

unread,
Jul 18, 2017, 2:06:36 PM7/18/17
to or-tools-discuss
To install binary archives for python, 

download the example file: (v6.2)


unzip, cd in the directory

<path to python2.7>/python.exe setup.py install

it should install at least 2 packages: protobuf, and ortools

to install from sources, you need to use make in or-tools\tools\make.exe

usually, in or-tools, type tools\make third_party, followed by tools\make python
You can test with tools\make test_python.

I hope this helps

PS: We will improve the doc.

--
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.
For more options, visit https://groups.google.com/d/optout.

Jonathan

unread,
Jul 18, 2017, 2:22:42 PM7/18/17
to or-tools-discuss
Thanks a lot for your quick reply. 

- Still struggling  C:\Python27\python.exe setup.py install gives an error. error: Could not find suitable distribution for Requirement.parse('ortools==6.2.4388')

Any idea on how to solve that ?

C:\Python27\python.exe setup.py install
running install
running bdist_egg
running egg_info
creating ortools_examples.egg-info
writing requirements to ortools_examples.egg-info\requires.txt
writing ortools_examples.egg-info\PKG-INFO
writing top-level names to ortools_examples.egg-info\top_level.txt
writing dependency_links to ortools_examples.egg-info\dependency_links.txt
writing manifest file 'ortools_examples.egg-info\SOURCES.txt'
reading manifest file 'ortools_examples.egg-info\SOURCES.txt'
writing manifest file 'ortools_examples.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
warning: install_lib: 'build\lib' does not exist -- no Python modules to install

creating build
creating build\bdist.win-amd64
creating build\bdist.win-amd64\egg
creating build\bdist.win-amd64\egg\EGG-INFO
copying ortools_examples.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO
copying ortools_examples.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying ortools_examples.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying ortools_examples.egg-info\requires.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying ortools_examples.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist\ortools_examples-6.2.4388-py2.7.egg' and adding 'build\bdist.win-amd64\egg' to it
removing 'build\bdist.win-amd64\egg' (and everything under it)
Processing ortools_examples-6.2.4388-py2.7.egg
Copying ortools_examples-6.2.4388-py2.7.egg to c:\python27\lib\site-packages
Adding ortools-examples 6.2.4388 to easy-install.pth file



Installed c:\python27\lib\site-packages\ortools_examples-6.2.4388-py2.7.egg
Processing dependencies for ortools-examples==6.2.4388
Searching for ortools==6.2.4388
No local packages or working download links found for ortools==6.2.4388
error: Could not find suitable distribution for Requirement.parse('ortools==6.2.4388')

####
Python 2.7 (r27:82525, Jul  4 2010, 07:43:08) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pip
>>> installed_packages = pip.get_installed_distributions()
>>> installed_packages_list = sorted(["%s==%s" % (i.key, i.version)
...      for i in installed_packages])
>>> print(installed_packages_list)
['numpy==1.13.1', 'ortools-examples==6.2.4388', 'ortools==1.3549', 'pandas==0.20.3', 'pip==9.0.1', 'protobuf==3.3.0', 'python-dateutil==2.6.1', 'python-gflags==3.1.1', 'pytz==2017.2', 'setuptools==36.2.0', 'six==1.10.0', 'wheel==0.29.0', 'xlrd==1.0.0']


- tools\make third_party gives me the error specified on my first post.

Thanks,

Laurent Perron

unread,
Jul 18, 2017, 5:32:09 PM7/18/17
to or-tools-discuss
Hi, 

my command prompt is the no developer command prompt for vs 2017, but the x64 native tools command prompt for vs 2017

can you try with that?

Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00


To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discuss+unsubscribe@googlegroups.com.

Laurent Perron

unread,
Jul 18, 2017, 5:53:52 PM7/18/17
to or-tools-discuss
OK, let's make sure all assumptions are correct.
You are using 64 bit python on a 64 bit windows?

Jonathan

unread,
Jul 19, 2017, 3:26:36 AM7/19/17
to or-tools-discuss
I'v also tried using x64 native tools command prompt for VS 2017. I am getting the same error.

Jonathan

unread,
Jul 19, 2017, 3:27:47 AM7/19/17
to or-tools-discuss
Yes.

Python 2.7 (r27:82525, Jul  4 2010, 07:43:08) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.


Jonathan

unread,
Jul 19, 2017, 3:38:22 AM7/19/17
to or-tools-discuss
I've also tried to install from \or-tools-6.0\or-tools-6.0\tools by :

1) cd in \or-tools-6.0\or-tools-6.0\tools

2) C:\Python27\python.exe setup.py install 

3) Getting error :
 File "setup.py", line 25
    DELETEUNIX               extra_link_args=['/MANIFEST'],
                                           ^
SyntaxError: invalid syntax

In addition line 72: read('README.txt') won't work as the file is not in the directory.

Jonathan

unread,
Jul 19, 2017, 5:19:08 PM7/19/17
to or-tools-discuss
I finally used https://pypi.python.org/pypi/ortools/5.1.4045 executable (.exe). It is not the last version but at least it allows a quick install :)

Laurent Perron

unread,
Aug 2, 2017, 2:35:08 PM8/2/17
to or-tools-discuss

Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00


To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discuss+unsubscribe@googlegroups.com.

PG

unread,
Sep 6, 2017, 3:23:30 PM9/6/17
to or-tools-discuss
Hello, I've tried the installation of OR-Tools using the executable and also the make files without luck. I'm using Windows 10 and Microsoft Edge.
Any suggestions to install OR-Tools with Python 2.7?

Laurent Perron

unread,
Sep 7, 2017, 1:45:19 AM9/7/17
to or-tools-discuss
I need more info :-)

32 bit or 64 bit, which version, what is the error message?

Thanks

Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00


To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discuss+unsubscribe@googlegroups.com.

Laurent Perron

unread,
Sep 7, 2017, 7:30:44 AM9/7/17
to or-tools-discuss
(ok, 64 bit is in the title).

still, what is the error message?
Are you sure you installed 64 bit python?

Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00


Michael Powell

unread,
Sep 7, 2017, 11:47:49 PM9/7/17
to or-tools-discuss


On Tuesday, July 18, 2017 at 5:53:52 PM UTC-4, Laurent Perron wrote:
OK, let's make sure all assumptions are correct.
You are using 64 bit python on a 64 bit windows?

This is a hunch on my part, but the latest NuGet package was also built for 32-bit, not 64-bit; I get image related errors about it. Could be related. I've been using the version prior to that.

Laurent Perron

unread,
Sep 8, 2017, 7:47:27 AM9/8/17
to or-tools-discuss
I have not 32 bit build anywhere, are you sure of that?


Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00


To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discuss+unsubscribe@googlegroups.com.

Michael Powell

unread,
Sep 8, 2017, 9:07:24 AM9/8/17
to or-tools...@googlegroups.com
Positive. I had to roll back to the previous version.
> You received this message because you are subscribed to a topic in the
> Google Groups "or-tools-discuss" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/or-tools-discuss/ncxbtjaTInU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
Reply all
Reply to author
Forward
0 new messages