OpenSSL version for python

Hi,

I am trying to use the bertopic package in Python, but I’m facing issues because of a mismatch in OpenSSL versions. Here’s the situation:

  1. Python’s Built-In OpenSSL: Python 3.8.6 is built with OpenSSL 1.0.2o-fips (2018).
  • Verified via: python -c "import ssl; print(ssl.OPENSSL_VERSION)"
  1. System OpenSSL: The system’s OpenSSL version is 1.1.1k.
  • Verified via: openssl version

bertopic requires OpenSSL 1.1.1+, which is incompatible with Python’s current OpenSSL.

I would like to run Python with a version of OpenSSL compatible with the bertopic package (1.1.1+).

Thanks for your help,
Maria

Hi Maria

For future request pleas post on HPC issues catergorie and use the provided template.

Could you please give me the sbatch and the code to reproduce the error ?

How did you install bertopic

Hi,

Ive loaded the module and active my venv (the batch is in /home/users/r/reva/SFN_LNP/scripts/bert.sh) :

module load GCCcore/10.2.0 Python/3.8.6
. /home/users/r/reva//env_name/bin/activate

The error pops up when I simply do import, take aside running the code, just import fails : from bertopic import BERTopic

bertopic was installed directly in my venv via pip install.

Let me know if I can provide any other info.

Thanks,
Maria

Hi,

let me know if I can provide more information.

Thank you,

Maria

I am sorry for the wait time, we are on urgent issue impacting serverals users :confused:

Hi Adrien,

No problems. Please let me know if you had time to look into it.

Thank you,
Maria

@Maria.Reva

I’ve recompiled Python 3.8.6 with more recent OpenSSL version:

Before:

(baobab)-[sagon@login1 ~]$ python -c "import ssl; print(ssl.OPENSSL_VERSION)"
OpenSSL 1.0.2o-fips  27 Mar 2018

After:

(baobab)-[sagon@login1 ~]$ python -c "import ssl; print(ssl.OPENSSL_VERSION)"
OpenSSL 1.1.1k  FIPS 25 Mar 2021

By the way: is there a reason to use this old Python version instead of the latest we provide?

Best

Thanks a lot!

In my experience 3.8 worked well when prototyping on my personal machine, python version >3.9 resulted in the incompatibilities with others lib that we use along the way.

Thanks again,
Maria