The building process succeeds with no errors. However, it can't pass all the RUN_TESTS.
What did you expect to see
Successfully built the project and passed all the tests.
What did you see instead?
RUN_TESTS failed. Specifically, all the tests concerning Python failed, even for “python_init_version_test”.
1/458 Test #1: python_init_version_test ...................................................***Failed 0.25 sec
The detailed information of Test #1, for example, is shown as follows:
1/458 Testing: python_init_version_test
1/458 Test: python_init_version_test
Command: "C:/or-tools-stable/build/python/venv/Scripts/python.exe" "C:/or-tools-stable/build/python/version_test.py"
Directory: C:/or-tools-stable/build
"python_init_version_test" start time: May 09 18:42, China
Output:
----------------------------------------------------------
Traceback (most recent call last):
File "C:\or-tools-stable\build\python\version_test.py", line 18, in <module>
from ortools.init.python import init
ImportError: DLL load failed while importing init: 找不到指定的模块。(ModuleNotFoundError: No module named 'init')
<end of output>
Test time = 0.25 sec
----------------------------------------------------------
Test Failed.
"python_init_version_test" end time: May 09 18:42 China
"python_init_version_test" time elapsed: 00:00:00
----------------------------------------------------------
During the compilation of python/python_package, some output information is shown as follows:
InitializeBuildStatus:
Creating "x64\Release\python_package\python_package.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
Touching "x64\Release\python_package\python_package.tlog\unsuccessfulbuild".
CustomBuild:
"The build of 'C:\or-tools-stable\build\CMakeFiles\c8bea7353f7334139f036199b482ff55\stub_timestamp.rule' depends on 'C:\OR-TOOLS-STABLE\BUILD\PYTHON\ORTOOLS_TIMESTAMP' which is produced by the build of 'C:\or-tools-stable\ortools\python\setup.py.in'. The items cannot be built in parallel."
"The build of 'C:\or-tools-stable\build\CMakeFiles\c8bea7353f7334139f036199b482ff55\dist_timestamp.rule' depends on 'C:\OR-TOOLS-STABLE\BUILD\PYTHON\ORTOOLS_TIMESTAMP' which is produced by the build of 'C:\or-tools-stable\ortools\python\setup.py.in'. The items cannot be built in parallel."
"The build of 'C:\or-tools-stable\build\CMakeFiles\e96bdb2250d0d48c0914b73a8e401e1c\python_package.rule' depends on 'C:\OR-TOOLS-STABLE\BUILD\PYTHON\DIST_TIMESTAMP' which is produced by the build of 'C:\or-tools-stable\build\CMakeFiles\c8bea7353f7334139f036199b482ff55\dist_timestamp.rule'. The items cannot be built in parallel."
Generating python/ortools_timestamp
Generating python/pybind11_timestamp
Building Custom Rule C:/or-tools-stable/CMakeLists.txt
Generating python/stub_timestamp
ortools.init. Python.init: Failed to import, skipping
ortools.algorithms.python.knapsack_solver: Failed to import, skipping
ortools.graph.python.linear_sum_assignment: Failed to import, skipping
ortools.graph.python.max_flow: Failed to import, skipping
ortools.graph.python.min_cost_flow: Failed to import, skipping
ortools.constraint_solver.pywrapcp: Failed to import, skipping
ortools.linear_solver.pywraplp: Failed to import, skipping
ortools.linear_solver. Python.model_builder_helper: Failed to import, skipping
Processed 1 modules
Generated .\pybind11_abseil/status.pyi
ortools.math_opt.core. Python.solver: Failed to import, skipping
ortools.pdlp. Python.pdlp: Failed to import, skipping
ortools.sat. Python.swig_helper: Failed to import, skipping
ortools.scheduling.python.rcpsp: Failed to import, skipping
ortools.util. Python.sorted_interval_list: Failed to import, skipping
Generating python/dist_timestamp
Moreover, although Python cannot import init when executing “from ortools.init.python import init”, the obtained “ortools” package (in the directories “C:\or-tools-stable\build\python\venv\Lib\site-packages\ortools\init\python”) does contain the pyd file “init.cp310-win_amd64.pyd”
What version of OR-Tools and what language are you using? Version: stable (v9.9). Language: Python
Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi) CPLEX
What operating system (Linux, Windows, ...) and version? Windows 11
What did you do? I'm building OR tools for Python from source to enable the use of CPLEX solver. Steps to reproduce the behavior:
What did you expect to see Successfully built the project and passed all the tests.
What did you see instead? RUN_TESTS failed. Specifically, all the tests concerning Python failed, even for “python_init_version_test”. 1/458 Test #1: python_init_version_test ...................................................***Failed 0.25 sec The detailed information of Test #1, for example, is shown as follows:
During the compilation of python/python_package, some output information is shown as follows:
Moreover, although Python cannot import init when executing “from ortools.init.python import init”, the obtained “ortools” package (in the directories “C:\or-tools-stable\build\python\venv\Lib\site-packages\ortools\init\python”) does contain the pyd file “init.cp310-win_amd64.pyd”
The full output files are as follows: DebugBuildLog.txt DebugConfigureLog.txt DebugTestLog.txt