I have the following folders in my project
1. fire.py
2.main.py
3.traffic.avi #video file
4. vechile.py
pyinstaller --add-data 'traffic.avi:traffic.avi' --onefile main.py
should work.
For accessing the file, have a look at Bundling data files with PyInstaller (--onefile)
EDIT: You don't have to add the other files manually, if you imported the classes or methods into your main.py as far as i know. Pyinstaller resolves those dependencies by itself. I corrected my command above. Looks like you have to specify the target-filename as well.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.