I am trying to build a Python multi-file code with PyInstaller
. For that I have compiled the code with Cython
, and am using .so
files generated in place of .py
files.
Assuming the 1st file is main.py
and the imported ones are file_a.py
and file_b.py
, I get file_a.so
and file_b.so
after Cython compilation.
When I put main.py
, file_a.so
and file_b.so
in a folder and run it by "python main.py"
, it works.
But when I build it with PyInstaller
and try to run the executable generated, it throws errors for imports done in file_a
and file_b
.
How can this be fixed? One solution is to import all standard modules in main.py
and this works. But if I do not wish to change my code, what can be the solution?