Can not run python script on SALOME 9.11

I am trying to use one script called salomeToOpenFOAM, available here. When I try to import it in the object browser and run the script via file->load script, apparently nothing happens. When I try to run the script on the python console, it gives me this output:

 File "<input>", line 1, in <module>
NameError: name 'salomeToOpenFOAM' is not defined

When I try to run an example provided by the developer, it gives me this output:

ModuleNotFoundError: No module named 'salome'

Am I missing something in the installation, or in any of the steps?

use this one: it works GitHub - EastEriq/salomeToOpenFOAM: A python script that outputs a Salome mesh to OpenFOAM
if you dont have pyramids in the mesh, I would recommend to: export in UNV format and use ideasToFoam. it will be faster.