'Error: Could not find module 'C:\Users\phong\Desktop\Python\libvlc.dll' (or one of its dependencies). Try using the full path with constructor syntax

I have a code like this

import vlc
player = vlc.MediaPlayer("a.mp4")
player.play()

and it give me this error

Traceback (most recent call last):
  File "c:\Users\phong\Desktop\Python\Media player\media_player.py", line 1, in <module>
    import vlc
  File "C:\Users\phong\AppData\Local\Programs\Python\Python310\lib\site-packages\vlc.py", line 210, in <module>
    dll, plugin_path  = find_lib()
  File "C:\Users\phong\AppData\Local\Programs\Python\Python310\lib\site-packages\vlc.py", line 170, in find_lib
    dll = ctypes.CDLL('.\\' + libname)
  File "C:\Users\phong\AppData\Local\Programs\Python\Python310\lib\ctypes\__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'C:\Users\phong\Desktop\Python\libvlc.dll' (or one of its dependencies). Try using the full path with constructor syntax.


Solution 1:[1]

download VLC 3.0.8 and unpack libvlc.dll?libvlccore.dll and plugins to the path "c:\windows\system32", but make sure vlc is 64 bits in case your python is 64 bits you can download from this address: http://download.videolan.org/pub/videolan/vlc/

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 NeroXX