importing redis in python script breaks the capture of the python output by the php script that has launched the python script

Version:
redis_version:7.2.4
redis-py : 5.0.3

Platform:
python3.12 on ubuntu22 / php 8.12 on nginx

Description:
I am executing a python process from a php script :

<?php

class execSomePythonScript {
     
  function __construct () {

     ob_start();
     passthru('/usr/bin/python3.12 pythonProc/testphp.py ';
     $output = ob_get_clean(); 

     print_r($output); exit;

  }
}

?>

the python script :

import json
output = { "c" : "b"}
print(json.dumps(output))

=> php output as expected { "c" : "b"}

However, importing redis breaks the capture of the output by php

import json
output = { "c" : "b"}
print(json.dumps(output))
import redis
print(json.dumps("c"))

=> cli output

{"c": "b"}
c

=> php output

{ "c" : "b"}

?