Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

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.

Post History

40%
+0 −1
Q&A 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?

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...

1 answer  ·  posted 4d ago by Franck Dernoncourt‭  ·  last activity 3d ago by Franck Dernoncourt‭

Question python huggingface-datasets onnxruntime glibc
#2: Post edited by user avatar Franck Dernoncourt‭ · 2025-04-30T02:37:41Z (4 days ago)
  • Running
  • ```python
  • 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.
  • Running
  • ```python
  • 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: Initial revision by user avatar Franck Dernoncourt‭ · 2025-04-30T02:37:08Z (4 days ago)
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?
Running

```python
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.