Personal tools
You are here: Home Forum Install & build Creating an executable for the python script in SALOME

Creating an executable for the python script in SALOME

Up to Install & build

Creating an executable for the python script in SALOME

Posted by Ashish Kumar at July 19. 2020

Hi,

I have created a python script to generate mesh based on lot of input parameters. I want to send this to other researcher in my lab and they don't have SALOME installed on their computer. I want to build an executable for my meshing script so that the other person in my lab can use it without installing SALOME.

Please let me know if there is any way to do that. 

Thanks

Ashish

Re: Creating an executable for the python script in SALOME

Posted by Nabil Ghodbane at July 19. 2020
In principle one could use pyinstaller but not sure it will work, since you will need SALOME/CORBA server to be running (I just tried one of the baseline examples and it failed at runtime)
 
All the same, to use pyinstaller, do:

./salome context

python -m pip install pyinstaller

mkdir myscript_x86_64

mv myscript.py myscript_x86_64

cd myscript_x86_64

pyinstaller myscript.py

Pyinstaller will create a subfolder nammed dist in which all required libraries will be copied. The binary will be installed in

dist/myscript/myscript

IMHO, the most pragmatic approach here is to ask your colleague to have SALOME installed. It's much simpler.

 

 

 

 

 

Powered by Ploneboard
Document Actions