Skip to content

Segmentation fault when importing tensorflow before ortools #3230

@youchangkim

Description

@youchangkim

What version of OR-Tools and what language are you using?
Version: v9.3
Language: Python

Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)
CP-SAT

What operating system (Linux, Windows, ...) and version?
macOS BigSur x86-64

What did you do?

  1. Download https://github.com/google/or-tools/blob/stable/ortools/sat/samples/simple_sat_program.py
  2. Insert import tensorflow before from ortools.sat.python import cp_model

What did you expect to see

x = 1
y = 0
z = 0

What did you see instead?

Segmentation fault: 11

Anything else we should know about your project / environment

  1. any tensorflow versions between v2.2.0 and v2.8.0 (available for py38) can reproduce the issue.
  2. or-tools v9.2 works fine with any tensorflow versions.
  3. importing tensorflow after ortools works fine.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions