python ssl

Hello, I’m using the .venv functionality of ParaView to add some extra packages (Install any python package for the ParaView binary release using pip), I use de uv + venv solution. My package depends on huggingface_hub, but after installation I have a ssl error at import.

The error can be reproduced by running “import ssl” in the python console. Working with ParaView 6.2.0 on linux downloaded from the ParaView website.

>>>
Python 3.12.14 (main, Sep 30 2026, 00:00:17) \[GCC 10.3.1 20210422 (Red Hat 10.3.1-1)\] on linux
>>> from paraview.simple import *
>>> import ssl
Traceback (most recent call last):
File "", line 1, in 
File "/home/fbw/Apps/ParaView-6.2.0-MPI-Linux-Python3.12-x86_64/lib/python3.12/ssl.py", line  100, in 
import _ssl             # if we can't import it, let the error propagate
^^^^^^^^^^^
ModuleNotFoundError: No module named '_ssl'

Any idea of how to solve this issue on my side. (ChatGPT tells me the packaging of the python distribution of ParaView has to be redone).

Thanks

pvpython is built without ssl support intentionnaly.

Provide your own python instead, see this: Install any python package for the ParaView binary release using pip

Sorry, but I thought the python can’t be changed after compilation.
I’m working on ParaView GUI (not the pvpython).
The link that you cite is for adding modules. I dont know how can apply this to provide my own python.

Thanks.

I dont know how can apply this to provide my own python.

Use uv to install the right version of Python (the one ParaView uses), then use that uv provided python (which contains ssl) to run your pvpython scripts.

To clarify, it should be same Python version ParaView uses, which for ParaView 6.2.0 is Python 3.12. If you are using other version of ParaView, the About menu will tel you the Python Library Version.

Sorry, but I think I’m missing something. I’ve already created a .venv using uv, with the same Python version as ParaView. However, I couldn’t figure out how to get ParaView (the GUI executable) to use the Python interpreter from my virtual environment. I don’t think this is possible.

SSL support has to be enabled when Python is compiled; it isn’t something that can be installed afterwards.

Thanks anyway for your support.

Correct, within the ParaView GUI you only have access to the python that was used to build ParaView with. You can always rebuild ParaView.

What are you trying to achieve exactly ?

I’m working on a plugin, a reader, for this lib. GitHub - PLAID-lib/plaid: PLAID (Physics-Learning AI Datamodel), a flexible and extensible framework for representing and sharing datasets of physics simulations · GitHub. Plaid is a dataset format for physics simulation. In a nutshell, is a database framework for AI algorithm. With splits (train, test,..) and samples per split. Where every sample is a multi step output of a simulation. The framework support streaming of samples using a hugging face storage online. the idea was to be able to visualise a sample without pulling the full dataset.

The python module (huggingface_hub) to interact with hugging face webpage needs SSL for the connection.

This is only a prototype, so I was trying to make it work with the official version. I agree with you that compiling ParaView is the way to go. This is a good solution when you don’t have distribution (a global installation in a cluster). But in a company, engineers and researchers have personal work computers (windows, wsl), in this case building, packaging, distributing and maintaining gets a little harder.