or-tools: ImportError: undefined symbol: _threadnumber
Hello, I’ve got python 3.8 as python3 in my system and python 3.7 virtual enviroment. I need to run or-tools in Jupyter notebook with kernel based on python 3.7 venv. What I did:
- cloned repo
- make third_party
- set UNIX_PYTHON_VER = 3.7 and UNIX_SCIP_DIR = /usr/scipoptsuite-6.0.2 in Makefile.local
- make python_package
- activated venv, cd into wheel package dir (or-tools/temp_python3.7/ortools/)
- pip install . Got “Successfully installed ortools-7.4.7384” answer
So ortools now into my venv/lib/python3.7/site-packages
But when I’ve tried to import pywraplp, I’ve got that error:
ImportError Traceback (most recent call last)
<ipython-input-1-9cb27b840291> in <module>
----> 1 from ortools.linear_solver import pywraplp
2 import numpy as np
3 import pandas as pd
4 from get_cost import score
~/py37/lib/python3.7/site-packages/ortools/linear_solver/pywraplp.py in <module>
11 # Import the low-level C/C++ module
12 if __package__ or "." in __name__:
---> 13 from . import _pywraplp
14 else:
15 import _pywraplp
ImportError: /home/satellite/py37/lib/python3.7/site-packages/ortools/linear_solver/../../ortools/.libs/libortools.so: undefined symbol: _threadnumber
System: Manjaro Linux 5.4.2-1 Python: Python 3.7.5 Jupyter: jupyter core : 4.6.1 ipython : 7.10.1 ipykernel : 5.1.3 jupyter client : 5.3.4 Or-tools: ortools-7.4.7384
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 22
Commits related to this issue
- tentative fix — committed to google/or-tools by lperron 3 years ago
- more makefile cleanups — committed to google/or-tools by lperron 3 years ago
I’ve found the package “ortools-9.0.9125-cp39-cp39-linux_x86_64.whl” in the path ‘/or-tools/build/python/dist/’, and it works via : pip install ortools-9.0.9125-cp39-cp39-linux_x86_64.whl
really nice of you and thank you very much