I have provisioned a vanila centos and then executed the following commands:
conda create --name an-env python=3.9
conda activate an-env
conda install -c conda-forge sentence-transformers
I am trying to import a hugging face library:
from sentence_transformers import SentenceTransformer
import os
In a centos 8 machine I get the following error:
libssl.so.3: cannot open shared object file: No such file or directory
I installed it using the following command:
conda install -c conda-forge sentence-transformers
Already tried the following:
yum install openssl.x86_64
yum install pyOpenSSL.x86_64
I also tried:
sudo ldconfig
and still get the following error:
libssl.so.3: cannot open shared object file: No such file or directory
Can anyone please help me how to resolve this error?
2
Answers
I got the idea from @CharlesDuffy as he mentioned
You need to have the same version of OpenSSL installed that your software was compiled against
I uninstalled the library using
conda uninstall sentence-transformers
. And then installed withpip install -U sentence-transformers
.This solves the issue.
I ran into a similar issue when building my Docker environments. It appears that in
conda-forge
, sometokenizers
builds for version 0.12.1 (more specifically those in*_0
) don’t include an OpenSSL dependency despite having been built against a specific version (apparently, >= 3.0). This can cause the conda (or, in my case, mamba) solver to choose this version despite it being incompatible with OpenSSL 1.1.1*.To fix this issue while still using conda, I suggest to explicit
tokenizers>=0.13.1
either inconda install
orenvironment.yml
.