Reputation: 113
So a bit of a broad question here.
Basically, I have designed and built a program that runs on my machine, using Python. The problem is when I turn it into an exe and try to run it on another windows 10 machine, it doesn't work.
The reason is because on my machine, I have python installed, python VLC installed and also the VLC player. Is the issue that I somehow need to package these programs (dependencies? Yes, I'm a noob) into the installation wizard or?
Would love some advice on what to do here as I'm working on a sentimental project for someone and it's really frustrating that I can't get it to work lol
Upvotes: 1
Views: 73
Reputation: 75629
You should not bundle VLC for many reasons even if that technically doable. The cleanest solution would be to check if VLC or the VLC player is installed and tell user to install it first if it's missing.
Upvotes: 0
Reputation: 2914
For python-vlc, you do need VLC installed. I do not know of a way to package vlc into a python exe. I would recommend looking into independent modules, that are not just python wrappers.
Edit:
You could use the sound functions from the pygame library:
import pygame.mixer
SOUND_FILE = 'file_path_here'
pygame.mixer.pre_init(44100, -16, 2, 2048)
pygame.mixer.init()
pygame.mixer.music.load(SOUND_FILE)
pygame.mixer.music.play(loops=0, start=1626) # 1626 seconds from beginning
while pygame.mixer.music.get_busy():
pygame.event.wait()
Upvotes: 1