Can not import vlc to python program

前端 未结 2 868
萌比男神i
萌比男神i 2021-01-29 00:21

I\'m trying to reproduce a video with sound in python Tkinter through VLC, but cannot run the file since I get an error when running the line import vlc.

I have python 3

2条回答
  •  被撕碎了的回忆
    2021-01-29 00:46

    Python-vlc is a binding of python to vlc program (or wrapper libraries). It is a way to run vlc program via python (python -> binding -> vlc). It will not run the vlc program itself so you need to do the following steps:

    1)  download vlc program and install it in your machine
    2)  restart your machine
    3)  run notebook again
    

    You may download and install vlc (64-bit) in this link: https://www.videolan.org/vlc/

    Reference:

    https://wiki.videolan.org/PythonBinding
    

    quote:

    Note that this only installs the python module itself, which depends on the availability of the libvlc libraries. You must also install VLC itself to get these libraries.

提交回复
热议问题