0

I have a project where I'm using a lot of libraries (with anaconda environment, on linux). When I add all files (--add-file 'master.db' , etc.) and make a command to create exe file, It does not make exe file. It cannot be open. When I open It through command line I get that error:

Traceback (most recent call last):
  File "sm.py", line 27, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'sword.key'
[261580] Failed to execute script sm

How do I pack the files:

pyinstaller --one-file --add-data 'master.db:.' --add-data 'sword.db:.' --add-data 'sword.key:.' sm.py
astqx
  • 2,058
  • 1
  • 10
  • 21
sOwlO
  • 3
  • 4
  • Ok. I solved that. I had to move all files to dist folder. But still the file is not .exe (can be open only trough command line). – sOwlO Feb 07 '21 at 05:28
  • Check [this](https://stackoverflow.com/a/13790741/14094985) post out, you will need to make slight changes to your code because of the way `pyinstaller` works. – astqx Feb 07 '21 at 23:18

0 Answers0