0
votes

I'm trying to make executable Tkinter file with photos, video and two songs using pyinstaller. I've done it without pictures, but I don't know how to connect them in the exe file. Is it possible using pyinstaller, or I need to use some other module? I am using python 3.8.2

1
your python script has them linked right?just make an exe with pyinstaller and then run it,from where the path is correct - Cool Cloud
I replaced the .exe file in the folder with the python script and the image and it worked (The script contained only one image as a test). Still can't make it run with audio, it says "Failed to execute script playmusic" (playmusic is the name of the script). - Zivko Stoimcev
Audio? Is the audio in the right destination as mentioned in your script? - Cool Cloud
Yes, everything is placed right. When I run the script from VS Code it runs without problems. - Zivko Stoimcev
Have you move the exe from the dist folder to the script directory? - Cool Cloud

1 Answers

1
votes

PyInstaller won't do such a thing. You need to provide your sound files manually. First, you need to add your sound files to the output executable with add-data flag then create a function to load your files from the extracted path