Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3 support #63

Closed
orwant opened this issue Aug 5, 2015 · 30 comments
Closed

Python 3 support #63

orwant opened this issue Aug 5, 2015 · 30 comments
Assignees
Labels
Lang: Python Python wrapper issue
Milestone

Comments

@orwant
Copy link
Collaborator

orwant commented Aug 5, 2015

Originally reported on Google Code with ID 47

I see on PyPI that your Python wrapper only works on Python 2. Any chance of adding
support for Python 3?

Reported by kermit666 on 2014-08-21 08:35:40

@orwant orwant self-assigned this Aug 5, 2015
@glennon
Copy link
Contributor

glennon commented Sep 2, 2015

I feel like i should be moving faster toward 3 myself, so 👍 to keep the gravity moving that direction.

@lperron
Copy link
Collaborator

lperron commented Dec 14, 2015

Done.

Look for py3-ortools on pypi.

Thanks

@lperron lperron closed this as completed Dec 14, 2015
@mjfwest
Copy link
Contributor

mjfwest commented Dec 14, 2015

I think you might want to look for py3-ortools and not py3-or-tools?
https://pypi.python.org/pypi/py3-ortools/2.3408

@lperron
Copy link
Collaborator

lperron commented Dec 14, 2015

Corrected, thanks

@lperron
Copy link
Collaborator

lperron commented Dec 14, 2015

@hastebrot
Copy link

Python eggs for Windows are missing. Great work with Python 3 support!

@lperron
Copy link
Collaborator

lperron commented Dec 14, 2015

Yes,

I need to build them :-)

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

2015-12-14 12:47 GMT+01:00 Benjamin Gudehus notifications@github.com:

Python eggs for Windows are missing. Great work with Python 3 support!


Reply to this email directly or view it on GitHub
#63 (comment).

@devster31
Copy link

I'm getting a strange error with pip install py3-ortools, pip can see it with pip search but when I install the package I get:

Collecting py3-ortools
  Could not find a version that satisfies the requirement py3-ortools (from versions: )
No matching distribution found for py3-ortools

I'm on OSX Yosemite, with pyenv, python --version Python 3.5.0.

@lperron
Copy link
Collaborator

lperron commented Dec 17, 2015

Sorry,

I built it for El Capitan.

setuptools cannot support two versions of OSX simultaneously.

--Laurent

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

2015-12-17 15:20 GMT+01:00 Daniele notifications@github.com:

I'm getting a strange error with pip install py3-ortools, pip can see it
with pip search but when I install the package I get:

Collecting py3-ortools
Could not find a version that satisfies the requirement py3-ortools (from versions: )
No matching distribution found for py3-ortools

I'm on OSX Yosemite, with pyenv, python --version Python 3.5.0.


Reply to this email directly or view it on GitHub
#63 (comment).

@devster31
Copy link

In this case I can build it from source, where can I find the instructions? Do I need to be careful of something in particular with pyenv or virtual environments?

@lperron
Copy link
Collaborator

lperron commented Dec 17, 2015

https://developers.google.com/optimization/installing

On mac,

install python3, checkout or-tools sources,

after make third_party

edit Makefile.local

add ADD_PYTHON_INC = -I/Library/Frameworks/Python.framework/Versions/3.5/
include/python3.5m/

Then run

make install_python_modules
make python
make test_python

and then

make pypi3_archive
cd temp/or-tools
python3.5 setup.py install

This should do the trick.

Thanks

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

2015-12-17 15:49 GMT+01:00 Daniele notifications@github.com:

In this case I'm can build it from source, where can I find the
instructions? Do I need to be careful of something in particular with pyenv
or virtual environments?


Reply to this email directly or view it on GitHub
#63 (comment).

@devster31
Copy link

Thanks, that went mostly well but I'd like to post a few issues I encountered and how I solved them.
First step was make third_party from the cloned repo.
Then since I used brew to install python and pyenv to manage virtual environments (with the system path instead of the user path) and I ended up adding the following lines to the Makefile.local:

CMAKE = /usr/local/bin/cmake
ADD_PYTHON_INC = -I/usr/local/var/pyenv/versions/<yourversion>/include -I/usr/local/var/pyenv/versions/<yourversion>/lib \
         -I/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/include/python3.5m \
         -I/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5
SWIG_PYTHON3_FLAG=-py3
UNIX_PYTHON_VER = 3.5

(cmake wasn't being found, no idea why), but I couldn't modify PYTHON_INC for some reason, possibly because the Makefile.unix is included later.
Then I ended up modifying the commands for install_python_module to these:

install_python_modules: install_protobuf
        cd dependencies/sources/protobuf-$(PROTOBUF_TAG)/python && python$(PYTHON_VERSION) setup.py sdist
        cd dependencies/sources/protobuf-$(PROTOBUF_TAG)/python && pip$(PYTHON_VERSION) install ./dist/protobuf-3.0.0a4.tar.gz # This is not the same as PROTOBUF_TAG

I ran them manually but they could be added to the Makefile, it makes the package easily removable with a simple pip remove protobuf.

make python
make test_python
make pypi3_archive
cd temp/or-tools

These went as expected.
After that I again changed the last line to:

python setup.py sdist
pip install ./dist/py3-ortools-2.3420.tar.gz

Everything seems to work just fine.
As a sidenote these directories:

    dependencies/sources/pcre-8.37/
    lib/
    temp/

are not in the gitignore file.

@pikeas
Copy link

pikeas commented Jan 10, 2016

I'm trying to install or-tools and having a pretty rough time. I'm on OS X 10.10.5.

Let's start at https://developers.google.com/optimization/installing. First issue: Python 2.7 only, although later docs and GH issues point to py3-ortools. This should be mentioned up front so people grab the right package, and so Py3 users don't turn away preemptively.

Next, I'm unable to find the PyPi package because it's built against El Capitan only. This is also missing from the docs.

Step two in the docs links to Google.OrTools.python.examples. Let's install that. Nope, setup.py starts by installing or-tools from PyPi, which fails like above.

Okay, let's grab the Google.OrTools.cc.MacOsX64.3393.tar.gz release from Github. Nope, no Python files.

Let's build from source? Looks like we need make third_party:

cd dependencies/sources/gflags-2.1.2 && \
     -D BUILD_SHARED_LIBS=ON \
         -D BUILD_STATIC_LIBS=ON \
             -D CMAKE_INSTALL_PREFIX=../../install \
         -D CMAKE_CXX_FLAGS=-fPIC \
             .
/bin/sh: -D: command not found
make: *** [dependencies/install/bin/gflags_completions.sh] Error 127

And now I'm more than an hour into trying to get this to work. Help?

@orwant
Copy link
Collaborator Author

orwant commented Jan 11, 2016

Hi Aris,

I was able to install or-tools on OSX 10.10.5 without any problems:

  1. Download Google.OrTools.python.examples.3549.zip from
    https://drive.google.com/folderview?id=0B2yUSpEp04BNdEU4QW5US1hvTzg&usp=sharing#list
    .
  2. unzip Google.OrTools.python.examples.3549.zip
  3. cd ortools_examples/
  4. sudo python setup.py install
  5. sudo python examples/golomb8.py

Solution #0: value = 44, failures = 0, branches = 7,time = 6 ms
Solution #1: value = 41, failures = 8, branches = 19,time = 7 ms
Solution #2: value = 40, failures = 9, branches = 21,time = 7 ms
Solution #3: value = 39, failures = 50, branches = 103,time = 8 ms
Solution #4: value = 38, failures = 58, branches = 119,time = 8 ms
Solution #5: value = 36, failures = 197, branches = 396,time = 12 ms
Solution #6: value = 34, failures = 255, branches = 511,time = 13 ms
Total run : failures = 2448, branches = 4890, time = 90 ms

Try following those steps and let us know if it works for you.

Jon

On Sun, Jan 10, 2016 at 12:49 AM, Aris Pikeas notifications@github.com
wrote:

I'm trying to install or-tools and having a pretty rough time. I'm on OS X
10.10.5.

Let's start at https://developers.google.com/optimization/installing.
First issue: Python 2.7, although later docs and GH issues point to
py3-ortools. This should be mentioned up front so people grab the right
package, and so Py3 users don't turn away preemptively.

Next, I'm unable to find the PyPi package because it's built against El
Capitan only. This is also missing from the docs.

Step two in the docs links to Google.OrTools.python.examples. Let's
install that. Nope, setup.py starts by install or-tools from PyPi, which
fails like above.

Okay, let's grab the Google.OrTools.cc.MacOsX64.3393.tar.gz release from
Github. Nope, no Python files.

Let's build from source? Looks like we need make third_party:

cd dependencies/sources/gflags-2.1.2 &&
-D BUILD_SHARED_LIBS=ON
-D BUILD_STATIC_LIBS=ON
-D CMAKE_INSTALL_PREFIX=../../install
-D CMAKE_CXX_FLAGS=-fPIC
.
/bin/sh: -D: command not found
make: *** [dependencies/install/bin/gflags_completions.sh] Error 127

And now I'm more than an hour into trying to get this to work. Help?


Reply to this email directly or view it on GitHub
#63 (comment).

@pikeas
Copy link

pikeas commented Jan 11, 2016

@orwant This is incorrect. I have just double-checked on a different machine, following your steps, and my install fails:

Installed /Users/pikeas/.virtualenvs/dfs/lib/python2.7/site-packages/ortools_examples-1.3549-py2.7.egg
Processing dependencies for ortools-examples==1.3549
Searching for ortools
Reading https://pypi.python.org/simple/ortools/
No local packages or download links found for ortools
error: Could not find suitable distribution for Requirement.parse('ortools')

As I mentioned earlier, the examples file tries to install or-tools from PyPi. This fails on non-El Capitan systems by design (see @lperron's comment earlier in the thread). That's why I'm trying to build it from source, and building it from source is where things are failing.

@mjfwest
Copy link
Contributor

mjfwest commented Jan 12, 2016

Hello @pikeas,
This is a repeat of what @devster31 and @lperron have said, but recently tested, so can you try the following as this works for me on 10.11.2 (El Capitan):

  1. Install cmake and other dependancies via home-brew, or by other means but note which method you have done. I am also using python3.5 installed by Conda, please note which Python you are using.
  2. Clone the source from Github.
  3. make third_party
    You should see a message makefiles/Makefile.unix:227: "cmake found: /usr/local/bin/cmake”if the correct make file has been found, otherwise the fix I proposed in #127 added check to see if cmake can be found on the path, before setting … #129 is not working as intended, and you should change it to 1fbab49
  4. If using virtual environments, I would change into the correct Conda python virtual environment at this point.
  5. Locate where your python include directory is. You can do that with the command locate Python.h, if you have the indexes for locate built. The correct one will depend on your python environment, for example:
    /anaconda/envs/or-tools/include/python3.5m/
  6. Edit Makefile.local add the 3 lines:
UNIX_PYTHON_VER = 3.5
SWIG_PYTHON3_FLAG=-py3
ADD_PYTHON_INC = -I/<Location from above>/include/python3.5m/
  1. Then follow on with Laurent’s instructions:
make install_python_modules
make python
make test_python
  1. Then:
make pypi3_archive
cd temp/or-tools
python3.5 setup.py install

@pikeas
Copy link

pikeas commented Jan 12, 2016

Major edit

I figured out the problem. Here's the error I saw, even after upgrading to El Capitan:

$ make third_party
cd dependencies/sources/gflags-2.1.2 && \
     -D BUILD_SHARED_LIBS=ON \
         -D BUILD_STATIC_LIBS=ON \
             -D CMAKE_INSTALL_PREFIX=../../install \
         -D CMAKE_CXX_FLAGS=-fPIC \
             .
/bin/sh: -D: command not found
make: *** [dependencies/install/bin/gflags_completions.sh] Error 127

I was stumped because this looks like an invalid shell script. However, after reviewing Makefile.unix, I added @mjfwest's suggestion from 1fbab49 and was able to move forward. So, #129 failed to find my homebrew-installed cmake.

Please note that there are still a couple of issues which can hopefully be resolved at the package level:

  • ortools did not install via pip, even under El Capitan (no compatible versions found).
  • py3-ortools is only built for Linux.

@lperron
Copy link
Collaborator

lperron commented Jan 12, 2016

Hi

pip install does not work.
You need eazy_install. This whole pypi is such a mess, but I sound like a
broken record now.

py3-ortools is build for mac. For whatever reason, pypi decided it is a
10.6 library :-(
See
https://pypi.python.org/pypi?:action=display&name=py3-ortools&version=2.3409

Please try installing the official cmake app from cmake

And can you tell me the path to cmake from brew? I guess the script does
not find it.

Thanks

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

2016-01-12 1:23 GMT-08:00 Aris Pikeas notifications@github.com:

I've upgraded to El Capitan and am still unable to install ortools.

Py3-ortools is built for Linux only.

Ortools is built for El Capitan (
https://pypi.python.org/packages/2.7/o/ortools/ortools-2.3393-py2.7-macosx-10.11-intel.egg)
but is not found by pip:

$ pip install ortools
Collecting ortools
Could not find a version that satisfies the requirement ortools (from versions: )
No matching distribution found for ortools

Build from source fails at the first make step:

$ brew install cmake
(...)
$ cmake --version
cmake version 3.4.1
$ make third_party
cd dependencies/sources/gflags-2.1.2 &&
-D BUILD_SHARED_LIBS=ON
-D BUILD_STATIC_LIBS=ON
-D CMAKE_INSTALL_PREFIX=../../install
-D CMAKE_CXX_FLAGS=-fPIC
.
/bin/sh: -D: command not found
make: *** [dependencies/install/bin/gflags_completions.sh] Error 127

I have seen the above error on El Capitan and Mavericks.

@mjfwest https://github.com/mjfwest Your linked changes check for
cmake, which is installed and available on my $PATH.


Reply to this email directly or view it on GitHub
#63 (comment).

@mjfwest
Copy link
Contributor

mjfwest commented Jan 12, 2016

@lperron
I think the cmake issue is partly my fault, the pull request I sent in #129 appears not to be the one I tested, and I am now fairly sure is broken, the working one is in 1fbab49.
Brew cmake will normally be in /usr/local/bin/cmake, but I would assume it can already be found on the path.
Please see #140 for the fix to the fix.

@lperron
Copy link
Collaborator

lperron commented Jan 12, 2016

Thanks

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

2016-01-12 3:26 GMT-08:00 Martin West notifications@github.com:

@lperron https://github.com/lperron
I think the cmake issue is partly my fault, the pull request I sent in
#129 #129 appears not to be the
one I tested, and I am now fairly sure is broken, the working one is in
1fbab49
1fbab49
.

Brew cmake will normally be in /usr/local/bin/cmake, but I would assume
it can already be found on the path.


Reply to this email directly or view it on GitHub
#63 (comment).

@pikeas
Copy link

pikeas commented Jan 14, 2016

Just had a chance to loop back this. Build fails at make install_python_modules:

In a virtualenv:

$ make install_python_modules
<...>
cd dependencies/sources/protobuf-3.0.0-beta-1/python && python3.5 setup.py install --user
running install
Checking .pth file support in /Users/pikeas/.local/lib/python3.5/site-packages/
/Users/pikeas/.virtualenvs/dfs/bin/python3.5 -E -c pass
TEST FAILED: /Users/pikeas/.local/lib/python3.5/site-packages/ does NOT support .pth files
error: bad install directory or PYTHONPATH

And outside of virtualenv (homebrew-installed Python 3.5):

$ make install_python_modules
<...>
cd dependencies/sources/protobuf-3.0.0-beta-1/python && python3.5 setup.py install --user
running install
error: can't combine user with prefix, exec_prefix/home, or install_(plat)base
make: *** [install_python_modules] Error 1

I can move past this by manually installing protobuf from the directory. But since protobuf can be installed via pip directly, I did that instead.

I've been able to run a few examples, which also required modification - many of them use print as a statement and require google.apputils.

I'm looking forward to finally using ortools, but the packaging/installation/documentation experience needs a lot of work.

@lperron
Copy link
Collaborator

lperron commented Jan 25, 2016

Which system are you on?

I remember python install --user failing, there is a workaround somewhere
on the web.

Thanks

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

2016-01-14 1:37 GMT+01:00 Aris Pikeas notifications@github.com:

Just had a chance to loop back this. Build fails at make
install_python_modules:

In a virtualenv:

$ make install_python_modules
<...>
cd dependencies/sources/protobuf-3.0.0-beta-1/python && python3.5 setup.py install --user
running install
Checking .pth file support in /Users/pikeas/.local/lib/python3.5/site-packages/
/Users/pikeas/.virtualenvs/dfs/bin/python3.5 -E -c pass
TEST FAILED: /Users/pikeas/.local/lib/python3.5/site-packages/ does NOT support .pth files
error: bad install directory or PYTHONPATH

And outside of virtualenv (homebrew-installed Python 3.5):

$ make install_python_modules
<...>
cd dependencies/sources/protobuf-3.0.0-beta-1/python && python3.5 setup.py install --user
running install
error: can't combine user with prefix, exec_prefix/home, or install_(plat)base
make: *** [install_python_modules] Error 1


Reply to this email directly or view it on GitHub
#63 (comment).

@Abraxos
Copy link

Abraxos commented Mar 23, 2016

Hello,

I am using Debian Jessie and I see that or-tools is available here: https://pypi.python.org/pypi/py3-ortools and when I pip search ortools I can see that there are packages available for ortools and py3-ortools. For some reason however, when I try to install ortools with either pip install ortools or with pip3 install ortools (I would prefer to use python3, but am OK with using python2.7) I get the following error:

Downloading/unpacking ortools
  Could not find any downloads that satisfy the requirement ortools
Cleaning up...
No distributions at all found for ortools
Storing debug log for failure in /home/<user>/.pip/pip.log

I was wondering if this was a known issue or if I am doing something wrong because I was hoping to get ortools working in a virtualenv.

Notably, I can get it installed and working by downloading the zip from the releases page and then:

$ sudo python setup.py install
$ sudo python examples/golomb8.py

But when I do it this way, I can only run it as root and I don't really like the idea of having to run programs like this as root. Is there something I am missing with the installation procedure?

@lperron
Copy link
Collaborator

lperron commented Mar 23, 2016

Hi,

Debian and Ubuntu do not share the same GLIBC.
I cannot build the same archive for both Debian and Ubuntu.

Unfortunately, I cannot tell pypi to build 2 archives as it cannot
differentiate between these two linux distros. It only knows linux32 and
linux64 :-(

What you can do:

  • install from source
  • make python (read the comment on python3 (see
    Python 3 support #63)
  • make test_python
  • make pypi_archive
  • cd temp/or-tools && python3 setup.py install (or build the egg file
    from there).

I hope this helps

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

2016-03-23 4:16 GMT+01:00 Eugene Kovalev notifications@github.com:

Hello,

I am using Debian Jessie and I see that or-tools is available here:
https://pypi.python.org/pypi/py3-ortools and when I pip search ortools I
can see that there are packages available for ortools and py3-ortools. For
some reason however, when I try to install ortools with either pip
install ortools or with pip3 install ortools (I would prefer to use
python3, but am OK with using python2.7) I get the following error:

Downloading/unpacking ortools
Could not find any downloads that satisfy the requirement ortools
Cleaning up...
No distributions at all found for ortools
Storing debug log for failure in /home//.pip/pip.log

I was wondering if this was a known issue or if I am doing something wrong
because I was hoping to get ortools working in a virtualenv.

Notably, I can get it installed and working by downloading the zip from
the releases page and then:

$ sudo python setup.py install
$ sudo python examples/golomb8.py

But when I do it this way, I can only run it as root and I don't really
like the idea of having to run programs like this as root. Is there
something I cam missing with the installation procedure?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#63 (comment)

@Abraxos
Copy link

Abraxos commented Mar 23, 2016

OK, thank you. I'm gonna try to get it working on Ubuntu, I just kind of casually assumed that Debian and Ubuntu would work the same way, but apparently that's not the case. Thank you for your help though! (and thanks for the Python3 support too)

@Abraxos
Copy link

Abraxos commented Mar 23, 2016

Notably I tried to build from source on Debian and I got as far as make pypi_archive but I get the following issue (same thing happens when I try to make pypi3_archive):

eugene@terminator ~/D/b/or-tools-master> make pypi_archive
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
rm -rf temp
mkdir temp
mkdir temp/ortools
mkdir temp/ortools/ortools
mkdir temp/ortools/ortools/constraint_solver
mkdir temp/ortools/ortools/linear_solver
mkdir temp/ortools/ortools/graph
mkdir temp/ortools/ortools/algorithms
mkdir temp/ortools/dummy
cp src/gen/ortools/constraint_solver/*.py temp/ortools/ortools/constraint_solver
cp src/ortools/linear_solver/*.py temp/ortools/ortools/linear_solver
cp src/gen/ortools/linear_solver/*.py temp/ortools/ortools/linear_solver
cp src/gen/ortools/graph/pywrapgraph.py temp/ortools/ortools/graph
cp src/gen/ortools/algorithms/pywrapknapsack_solver.py temp/ortools/ortools/algorithms
touch temp/ortools/ortools/__init__.py
touch temp/ortools/ortools/constraint_solver/__init__.py
touch temp/ortools/ortools/linear_solver/__init__.py
touch temp/ortools/ortools/graph/__init__.py
touch temp/ortools/ortools/algorithms/__init__.py
cp tools/dummy_ortools_dependency.cc temp/ortools/dummy
cp tools/README.pypi temp/ortools/README.txt
cp LICENSE-2.0.txt temp/ortools
cp tools/setup.py temp/ortools
sed -i -e 's/VVVV/0/' temp/ortools/setup.py
cp lib/_pywrapcp.so temp/ortools/ortools/constraint_solver
cp lib/_pywraplp.so temp/ortools/ortools/linear_solver
cp lib/_pywrapgraph.so temp/ortools/ortools/graph
cp lib/_pywrapknapsack_solver.so temp/ortools/ortools/algorithms
cp lib/libortools.so temp/ortools/ortools
sed -i -e 's/\.dll/\.so/' temp/ortools/setup.py
sed -i -e 's/DELETEWIN //g' temp/ortools/setup.py
sed -i -e '/DELETEUNIX/d' temp/ortools/setup.py
sed -i -e 's/DLL/so/g' temp/ortools/setup.py
rm temp/ortools/setup.py-e
rm: cannot remove ‘temp/ortools/setup.py-e’: No such file or directory
makefiles/Makefile.python.mk:272: recipe for target 'pypi_archive' failed
make: [pypi_archive] Error 1 (ignored)
tools/fix_python_libraries_on_linux.sh

@lperron
Copy link
Collaborator

lperron commented Mar 29, 2016

Can you try removing line 315 (-rm ...) in makefiles/Makefile.python.mk ?

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

2016-03-23 20:58 GMT+01:00 Eugene Kovalev notifications@github.com:

Notably I tried to build from source on Debian and I got as far as make
pypi_archive but I get the following issue (same thing happens when I try
to make pypi3_archive):

eugene@terminator ~/D/b/or-tools-master> make pypi_archive
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
rm -rf temp
mkdir temp
mkdir temp/ortools
mkdir temp/ortools/ortools
mkdir temp/ortools/ortools/constraint_solver
mkdir temp/ortools/ortools/linear_solver
mkdir temp/ortools/ortools/graph
mkdir temp/ortools/ortools/algorithms
mkdir temp/ortools/dummy
cp src/gen/ortools/constraint_solver/.py temp/ortools/ortools/constraint_solver
cp src/ortools/linear_solver/
.py temp/ortools/ortools/linear_solver
cp src/gen/ortools/linear_solver/*.py temp/ortools/ortools/linear_solver
cp src/gen/ortools/graph/pywrapgraph.py temp/ortools/ortools/graph
cp src/gen/ortools/algorithms/pywrapknapsack_solver.py temp/ortools/ortools/algorithms
touch temp/ortools/ortools/init.py
touch temp/ortools/ortools/constraint_solver/init.py
touch temp/ortools/ortools/linear_solver/init.py
touch temp/ortools/ortools/graph/init.py
touch temp/ortools/ortools/algorithms/init.py
cp tools/dummy_ortools_dependency.cc temp/ortools/dummy
cp tools/README.pypi temp/ortools/README.txt
cp LICENSE-2.0.txt temp/ortools
cp tools/setup.py temp/ortools
sed -i -e 's/VVVV/0/' temp/ortools/setup.py
cp lib/_pywrapcp.so temp/ortools/ortools/constraint_solver
cp lib/_pywraplp.so temp/ortools/ortools/linear_solver
cp lib/_pywrapgraph.so temp/ortools/ortools/graph
cp lib/_pywrapknapsack_solver.so temp/ortools/ortools/algorithms
cp lib/libortools.so temp/ortools/ortools
sed -i -e 's/.dll/.so/' temp/ortools/setup.py
sed -i -e 's/DELETEWIN //g' temp/ortools/setup.py
sed -i -e '/DELETEUNIX/d' temp/ortools/setup.py
sed -i -e 's/DLL/so/g' temp/ortools/setup.py
rm temp/ortools/setup.py-e
rm: cannot remove ‘temp/ortools/setup.py-e’: No such file or directory
makefiles/Makefile.python.mk:272: recipe for target 'pypi_archive' failed
make: [pypi_archive] Error 1 (ignored)
tools/fix_python_libraries_on_linux.sh


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#63 (comment)

@Abraxos
Copy link

Abraxos commented Mar 29, 2016

It seems like the correct line to comment out (at least in the file I got was 287) but that got it working. (at least as far as running the golomb8.py example goes on Debian). Thank you!

@abner01061998
Copy link

Installer exe doesnt work
Bynari files installation doesnt work
Pip intstallation doesnt work

What really work? HEEELPPP

@lperron
Copy link
Collaborator

lperron commented Nov 10, 2017 via email

@Mizux Mizux added the Lang: Python Python wrapper issue label Feb 12, 2020
@Mizux Mizux added this to the v8.0 milestone Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lang: Python Python wrapper issue
Projects
None yet
Development

No branches or pull requests

10 participants