Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Import onnxruntime then load_dataset "causes ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found": why + how to fix?
+0
−1
Running
import onnxruntime as ort
from datasets import load_dataset
yields the error:
(env-312) dernoncourt@pc:~/test$ python SE--test_importpb.py
Traceback (most recent call last):
File "/home/dernoncourt/test/SE--test_importpb.py", line 2, in <module>
from datasets import load_dataset
File "/opt/conda/envs/env-312/lib/python3.12/site-packages/datasets/__init__.py", line 17, in <module>
from .arrow_dataset import Dataset
File "/opt/conda/envs/env-312/lib/python3.12/site-packages/datasets/arrow_dataset.py", line 57, in <module>
import pyarrow as pa
File "/opt/conda/envs/env-312/lib/python3.12/site-packages/pyarrow/__init__.py", line 65, in <module>
import pyarrow.lib as _lib
ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /opt/conda/envs/env-312/lib/python3.12/site-packages/pyarrow/lib.cpython-312-x86_64-linux-gnu.so)
(env-312) dernoncourt@pc:~/test$
Why and how to fix? I use:
- Python 3.12.9
- Ubuntu 20.04.5 LTS
datasets==3.5.0
onnxruntime==1.21.0
Running from datasets import load_dataset
or import onnxruntime as ort
alone works fine.
Crosspost: https://stackoverflow.com/q/79599437/395857
1 answer
+0
−0
Works for me
The following users marked this post as Works for me:
User | Comment | Date |
---|---|---|
Franck Dernoncourt | (no comment) | May 2, 2025 at 14:49 |
Inversing the import order works:
from datasets import load_dataset
import onnxruntime as ort
0 comment threads