question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fail to import import transformers.trainer due to libssl.so.10: cannot open shared object file: No such file or directory

See original GitHub issue

System Info

Traceback (most recent call last): File “/home/xxie92/anaconda3/envs/sema/lib/python3.8/site-packages/transformers/utils/import_utils.py”, line 1002, in _get_module return importlib.import_module(“.” + module_name, self.name) File “/home/xxie92/anaconda3/envs/sema/lib/python3.8/importlib/init.py”, line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File “<frozen importlib._bootstrap>”, line 1014, in _gcd_import File “<frozen importlib._bootstrap>”, line 991, in _find_and_load File “<frozen importlib._bootstrap>”, line 975, in _find_and_load_unlocked File “<frozen importlib._bootstrap>”, line 671, in _load_unlocked File “<frozen importlib._bootstrap_external>”, line 843, in exec_module File “<frozen importlib._bootstrap>”, line 219, in _call_with_frames_removed File “/home/xxie92/anaconda3/envs/sema/lib/python3.8/site-packages/transformers/trainer.py”, line 66, in <module> from .data.data_collator import DataCollator, DataCollatorWithPadding, default_data_collator File “/home/xxie92/anaconda3/envs/sema/lib/python3.8/site-packages/transformers/data/init.py”, line 19, in <module> from .data_collator import ( File “/home/xxie92/anaconda3/envs/sema/lib/python3.8/site-packages/transformers/data/data_collator.py”, line 21, in <module> from …models.bert import BertTokenizer, BertTokenizerFast File “/home/xxie92/anaconda3/envs/sema/lib/python3.8/site-packages/transformers/models/init.py”, line 19, in <module> from . import ( File “/home/xxie92/anaconda3/envs/sema/lib/python3.8/site-packages/transformers/models/mt5/init.py”, line 40, in <module> from …t5.tokenization_t5_fast import T5TokenizerFast File “/home/xxie92/anaconda3/envs/sema/lib/python3.8/site-packages/transformers/models/t5/tokenization_t5_fast.py”, line 23, in <module> from …tokenization_utils_fast import PreTrainedTokenizerFast File “/home/xxie92/anaconda3/envs/sema/lib/python3.8/site-packages/transformers/tokenization_utils_fast.py”, line 24, in <module> import tokenizers.pre_tokenizers as pre_tokenizers_fast File “/home/xxie92/anaconda3/envs/sema/lib/python3.8/site-packages/tokenizers/init.py”, line 79, in <module> from .tokenizers import ( ImportError: libssl.so.10: cannot open shared object file: No such file or directory

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File “test.py”, line 3, in <module> from transformers import Trainer, TrainingArguments, EvalPrediction File “<frozen importlib._bootstrap>”, line 1039, in _handle_fromlist File “/home/xxie92/anaconda3/envs/sema/lib/python3.8/site-packages/transformers/utils/import_utils.py”, line 992, in getattr module = self._get_module(self._class_to_module[name]) File “/home/xxie92/anaconda3/envs/sema/lib/python3.8/site-packages/transformers/utils/import_utils.py”, line 1004, in _get_module raise RuntimeError( RuntimeError: Failed to import transformers.trainer because of the following error (look up to see its traceback): libssl.so.10: cannot open shared object file: No such file or directory

Who can help?

No response

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, …)
  • My own task or dataset (give details below)

Expected behavior

I installed transformers following the official online website. steps: I create a new env using conda. And install it using conda. it give this error. i also tried from pip to install. the same error appear.

From the error message, it seems tokenizer package may be the problem. But I am not sure how to solve it.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
GeminiLncommented, Aug 29, 2022

Got the same error with conda install -c huggingface transfformers. And thank you @Utopiah , the pip works.

0reactions
fufeisicommented, Nov 10, 2022

Got the same error with conda install -c huggingface transfformers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Importing tokenizers version >0.10.3 fails due to openssl
So, the only tokenizer version I can install is 0.10.3 or lower. Any version higher (0.11 or higher) runs into an libssl error...
Read more >
ImportError: libssl.so.3: cannot open shared object file: No ...
System Info. Hi,. I get the following error when calling from transformers import BertModel, BertTokenizer . The error:
Read more >
libssl.so.10: cannot open shared object file - Ask Ubuntu
Our binaries don't support Ubuntu officially (yet). The official way to fix this problem is to recompile from source, which just has gotten...
Read more >
libssl.so.3: cannot open shared object file: No such file or ...
I uninstalled the library using conda uninstall sentence-transformers . And then installed with pip install -U sentence-transformers .
Read more >
Why am I getting error "libssl.so.1.0.0 - Splunk Answers
1.0.0: cannot open shared object file: No such file or directory" trying to implement a custom search command in Python?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found