I have a MyApp.spec
files where I have:
a = Analysis(...
datas=[
('file_1.jpg', '.',
('file_2.mplstyle', '.'),
]
...)
In my code, these files are used in methods as, for example, plt.style.use('file_2.mplstyle')
(python files and such extra files are in the same folder).
I compile my code with pyinstaller --onefile MyApp.spec
and it yields no error.
However, at execution time, the file_2.mplstyle
is not found.
So far, the only trick for the execution to succeed is to manually copy both files to the dist/
directory.