Package Details: python-or-tools 9.3-1

Git Clone URL: (read-only, click to copy)
Package Base: python-or-tools
Description: Google's Operations Research tools
Upstream URL:
Keywords: or-tools ortools
Licenses: Apache2
Submitter: dariost
Maintainer: sameer
Last Packager: sameer
Votes: 7
Popularity: 0.000142
First Submitted: 2017-07-11 23:45 (UTC)
Last Updated: 2022-03-19 05:10 (UTC)

Latest Comments

fow0ryl commented on 2022-08-02 06:21 (UTC) (edited on 2022-08-02 06:23 (UTC) by fow0ryl)

Installed python-absl package to fulfil the dependencys. But building python-or-tools failed ...

[ 75%] Building CXX object ortools/glop/CMakeFiles/ortools_glop.dir/ [ 75%] Building CXX object ortools/graph/CMakeFiles/ortools_graph.dir/ [ 76%] Building CXX object ortools/linear_solver/CMakeFiles/ortools_linear_solver.dir/ [ 76%] Building CXX object ortools/linear_solver/CMakeFiles/ortools_linear_solver.dir/ [ 76%] Building CXX object ortools/constraint_solver/CMakeFiles/ortools_constraint_solver.dir/ [ 76%] Building CXX object ortools/linear_solver/CMakeFiles/ortools_linear_solver.dir/ In Datei, eingebunden von /tmp/trizen-henning/python-or-tools/src/or-tools-9.3/ortools/graph/topologicalsorter.h:67, von /tmp/trizen-henning/python-or-tools/src/or-tools-9.3/ortools/graph/ /tmp/trizen-henning/python-or-tools/src/or-tools-9.3/ortools/graph/topologicalsorter.h:80:8: Fehler: Standardattribute inmitten von Deklarationssymbolen 80 | inline ABSL_MUST_USE_RESULT bool DenseIntTopologicalSort( | ^~~~~~~~~~~~~~~~~~~~ /tmp/trizen-henning/python-or-tools/src/or-tools-9.3/ortools/graph/topologicalsorter.h:80:8: Anmerkung: Standardattribute müssen vor den Deklarationsspezifizierern stehen, um für die Deklaration zu gelten, oder ihnen folgen, um für den Typ zu gelten /tmp/trizen-henning/python-or-tools/src/or-tools-9.3/ortools/graph/topologicalsorter.h:85:8: Fehler: Standardattribute inmitten von Deklarationssymbolen 85 | inline ABSL_MUST_USE_RESULT bool DenseIntStableTopologicalSort( | ^~~~~~~~~~~~~~~~~~~~ /tmp/trizen-henning/python-or-tools/src/or-tools-9.3/ortools/graph/topologicalsorter.h:85:8: Anmerkung: Standardattribute müssen vor den Deklarationsspezifizierern stehen, um für die Deklaration zu gelten, oder ihnen folgen, um für den Typ zu gelten make[2]: *** [ortools/graph/CMakeFiles/ortools_graph.dir/build.make:230: ortools/graph/CMakeFiles/ortools_graph.dir/] Fehler 1 make[1]: *** [CMakeFiles/Makefile2:6741: ortools/graph/CMakeFiles/ortools_graph.dir/all] Fehler 2 make[1]: *** Es wird auf noch nicht beendete Prozesse gewartet....

fow0ryl commented on 2022-07-31 13:21 (UTC)

I cannot find the dependency: absl-py

Valicek1 commented on 2022-05-27 06:43 (UTC)

Hi, as arch has jumped from gcc 11 to gcc 12, or-tools are not able to get compiled. Here is patch for quick-fix:

diff --git a/PKGBUILD b/PKGBUILD
index e48deed..03fb285 100644
@@ -7,7 +7,7 @@ arch=('x86_64' 'i686' 'aarch64' 'armv7h')
 depends=('python>=3.6' 'swig' 'python-protobuf>=3.19.1' 'absl-py>=0.13' 'python-numpy>=1.13.3')
-makedepends=('cmake' 'wget' 'lsb-release' 'automake' 'python-wheel' 'python-pip' 'git' 'python-mypy-protobuf')
+makedepends=('cmake' 'wget' 'lsb-release' 'automake' 'python-wheel' 'python-pip' 'git' 'python-mypy-protobuf' 'gcc11')
 optdepends=('cplex: CPLEX solver support' 'python-pandas: used by some examples' 'python-matplotlib: used by some examples')
@@ -16,9 +16,9 @@ b2sums=('3d2ca42788909801621efdb134e31d5638d9cbd50c4b879aa291a7ff7a0e8765b6bcb9d
 build() {
     cd "${srcdir}/or-tools-${pkgver}"
     if [ `pacman -Qi cpelx &>/dev/null` ]; then
-        cmake -S. -Bbuild -DBUILD_PYTHON:BOOL=ON -DUSE_CPLEX:BOOL=ON -DCPLEX_ROOT=/usr/lib/cplex
-       cmake -S. -Bbuild -DBUILD_PYTHON:BOOL=ON
+       cmake -S. -Bbuild -DBUILD_PYTHON:BOOL=ON -D CMAKE_C_COMPILER=gcc-11 -D CMAKE_CXX_COMPILER=g++-11
     cmake --build build

marcelom87 commented on 2022-03-31 18:50 (UTC)

Hi guys - I have received a bug when using python-or-tools 9.3-1, after trying to execute the bin-packing problem example in: . When executing the lines:

solver = cp_model.CpSolver()
status = solver.Solve(model)

I received:

/usr/include/c++/11.2.0/bits/stl_vector.h:1063: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator const [with _Tp = operations_research::sat::Literal; _Alloc = std::allocator<operations_research::sat::Literal>; std::vector<_Tp, _Alloc>::const_reference = const operations_research::sat::Literal&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__n < this->size()' failed. [Finished in 0.5s with exit code -6]

My arch is updated and my Python is the 3.10.4 .

sameer commented on 2022-01-15 17:04 (UTC) (edited on 2022-01-15 17:05 (UTC) by sameer)

I checked ortools-9.2.9999.dist-info/METADATA and found dependencies on absl-py & python-numpy which have been added in ff45efd6fab7. Seems like python-mypy-protobuf is needed as makedepends so I've added that in 9507eb4a61fd. Pandas + matplotlib only seem to be necessary to run examples so I've added them as optdepends in abedd03e0e11.

kruzah commented on 2022-01-15 13:48 (UTC) (edited on 2022-01-15 13:49 (UTC) by kruzah)

My build failed with a make error. In my case it was just python-mypy-protobuf which was missing:

protoc-gen-mypy: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
--mypy_out: protoc-gen-mypy: Plugin failed with status code 1.
make[2]: *** [CMakeFiles/Pyortools_proto.dir/build.make:89: python/ortools/constraint_solver/] Error 1
make[1]: *** [CMakeFiles/Makefile2:2008: CMakeFiles/Pyortools_proto.dir/all] Error 2

fow0ryl commented on 2022-01-15 11:38 (UTC) (edited on 2022-01-15 11:38 (UTC) by fow0ryl)

New version 9.2-1 build is working fine for me now. Did not have the packages installed which are named as dependency by @kruzah .... Only python-numpy was installed (as dependency of cura)

kruzah commented on 2022-01-15 11:21 (UTC)

Build misses several dependencies that cause the package to fail to build. Please add dependencies python-numpy, python-pandas, absl-py, and python-mypy-protobuf to PKGBUILD (I'm unsure which of these are runtime deps and which are make-only). Sourced from here

sameer commented on 2022-01-14 18:29 (UTC)

Hey all, sorry for the delay. This is fixed in 0ef1baa82d54.

Seems like the makefile method originally used no longer works, so the PKGBUILD now uses cmake directly as outlined here:

Let me know if you run into any other issues.

ericfont commented on 2022-01-12 19:49 (UTC)

I'm getting "ERROR: A failure occured in build(). Aborting..." on 9.2-1, but I don't know why cause my terminal screen doesn't go back enough.

fow0ryl commented on 2021-12-30 12:17 (UTC) (edited on 2021-12-30 12:19 (UTC) by fow0ryl)

version 9.2 did not build ...

got tons of errors:

/home/itsme/.cache/yay/python-or-tools/src/or-tools-9.2/dependencies/sources/scip-master/src/tclique/tclique.h:221:12: Fehler: expected »;« before »int«
|            ^

and finaly:

-- Installing: /home/itsme/.cache/yay/python-or-tools/src/or-tools-9.2/dependencies/install/lib/cmake/protobuf/protobuf-config-version.cmake
make[1]: Verzeichnis „/home/itsmeg/.cache/yay/python-or-tools/src/or-tools-9.2/dependencies/sources/protobuf-v3.19.1/build_cmake“ wird verlassen
==> FEHLER: Ein Fehler geschah in build().
Breche ab...
-> error making: python-or-tools

firoz commented on 2021-10-14 13:43 (UTC)

The package() step fails for me: pip [..] → no such option: --root

nobodyinperson commented on 2021-04-10 12:11 (UTC) (edited on 2021-04-10 14:02 (UTC) by nobodyinperson)

For those struggling to build python-or-tools on aarch64, here are the required changes for the PKGBUILD (at least for v8.2...):

diff --git a/PKGBUILD b/PKGBUILD
index cd226ff..eb72f8b 100644
@@ -15,8 +15,20 @@ sha384sums=('e5fdd4b5a40442fdafe48e677d8c45dc27d64f70bb42d508dd90e4ca64fed54be59

 build() {
     cd "${srcdir}/or-tools-${pkgver}"
+    if test "$CARCH" = "aarch64";then
+        # get up-to-date scripts
+        wget\*checkout\*/config/config/config.guess
+        wget\*checkout\*/config/config/config.sub
+        # overwrite old broken scripts with new ones by symlinks
+        find -mindepth 2 -iname config.guess | while read f;do ln -rsf config.guess "$f";done
+        find -mindepth 2 -iname config.sub  | while read f;do ln -rsf config.sub "$f";done
+    fi
     make third_party
     pacman -Qi cplex &> /dev/null && echo 'UNIX_CPLEX_DIR = /usr/lib' >> Makefile.local
+    if test "$CARCH" = "aarch64";then
+        # really dirty symlink to fix compilation on aarch64
+        ln -rsf dependencies/install/lib/libtpinone-7.0.1.linux.{arm,x86_64}.gnu.opt.a
+    fi
     make python
     make pypi_archive

Further info:

sameer commented on 2020-12-12 03:09 (UTC)

I've updated to v8.1 in b62a6cbdb46d

sameer commented on 2020-10-11 14:35 (UTC) (edited on 2020-10-11 14:39 (UTC) by sameer)

I've updated to v8.0 and added MadTux's suggestion in b6b5cf447d0d.

MadTux commented on 2020-08-14 15:56 (UTC) (edited on 2020-08-14 15:57 (UTC) by MadTux)

Could you add something like pacman -Qi cplex &> /dev/null && echo 'UNIX_CPLEX_DIR = /usr/lib' >> Makefile.local to build() please?

So that CPLEX can be used out of the box when it is installed.

EDIT: This would go between make third_party and make python according to the OR-Tools docs.

sameer commented on 2020-08-06 00:28 (UTC)

Thanks mcol, added in cdf6e5b20c97

mcol commented on 2020-08-05 17:49 (UTC) (edited on 2020-08-05 17:49 (UTC) by mcol)

Hey, this needs git as a makedepend btw :)

sameer commented on 2020-06-13 06:11 (UTC) (edited on 2020-06-13 06:11 (UTC) by sameer)

flipflop97: thanks for bringing this to my attention, I've added it to makedepends. v7.7 was released today and I've also updated the package to reflect that

flipflop97 commented on 2020-06-05 18:19 (UTC)

Hi, it seems to require python-pip as makedepend. Can you add that?

sameer commented on 2020-04-24 04:00 (UTC)

FirefighterBlu3: looks like python-wheel was missing in makedepends, which I've now added.

In other news, I've updated to v7.6 which was released today.

FirefighterBlu3 commented on 2020-04-10 17:54 (UTC) (edited on 2020-04-10 17:54 (UTC) by FirefighterBlu3)

has breakage in build()

cp -R /tmp/pkgbuilder-995/python-or-tools/src/or-tools-7.5/dependencies/install/lib/libproto* temp_python3.8/ortools/ortools/.libs
cp -R /libabsl* temp_python3.8/ortools/ortools/.libs
cp: cannot stat '/libabsl*': No such file or directory
make: [makefiles/ pypi_archive] Error 1 (ignored)
cp -R dependencies/install/lib*/libCbc* temp_python3.8/ortools/ortools/.libs
cp -R dependencies/install/lib*/libCgl* temp_python3.8/ortools/ortools/.libs
cp -R dependencies/install/lib*/libClp* temp_python3.8/ortools/ortools/.libs
cp -R dependencies/install/lib*/libOsi* temp_python3.8/ortools/ortools/.libs
cp -R dependencies/install/lib*/libCoinUtils* temp_python3.8/ortools/ortools/.libs
cd temp_python3.8/ortools && "/usr/bin/python3.8" bdist_wheel
usage: [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: --help [cmd1 cmd2 ...]
   or: --help-commands
   or: cmd --help

error: invalid command 'bdist_wheel'
make: *** [makefiles/ pypi_archive] Error 1
==> ERROR: A failure occurred in build().

sameer commented on 2020-01-28 20:50 (UTC) (edited on 2020-01-28 20:50 (UTC) by sameer)

why don't naming it python-ortools ? like the pypi package ?

I took maintenance of the package after it was orphaned, but it might be related to the repo being called or-tools on GitHub. If there's a way to rename it easily let me know.

I've updated the package to v7.5.

mizux commented on 2020-01-28 14:36 (UTC)

why don't naming it python-ortools ? like the pypi package ?

sameer commented on 2019-11-14 19:54 (UTC)

Python 3.8 support will arrive with the next release.

sameer commented on 2019-09-18 21:17 (UTC) (edited on 2019-09-18 21:18 (UTC) by sameer)

  • Updated the package to build OR Tools 7.3
  • Now, you get the same installation you would get if you installed it with pip
  • Relaxed Python version requirements to Python >= 3.5. Python 2.7 is being sunset so I haven't added it
  • Added a dependency on python-protobuf since the wheel file specifies it

Zento commented on 2018-08-09 09:40 (UTC) (edited on 2018-08-09 09:40 (UTC) by Zento)

The version limitation of the python dependency seems to be wrong. According to the documentation, the requirement is Python >=3.6 or Python >= 2.7.


Otherwise, thanks for maintaining the package!

dric512 commented on 2018-05-10 13:29 (UTC)

During installation, I noticed that the following packages are required for installation: wget and lsb-release