Reputation: 51
So I am running into the following error when trying to import the VLC library into Python. I am fairly new to Python, so any detailed help would be appreciated. This is on Windows 11.
I have done the following debug:
Installed 64-bit VLC
Installed 64-bit Python3.7
Added PYTHON37 and PYTHON37/Scripts to the Environment PATH variables.
Checked the pathing and the vlc.py does exist in the directory listed
Traceback (most recent call last):
File "program.py", line 39, in <module>
import vlc
File "C:\Users\%USER%\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\vlc.py", line 210, in <module>
dll, plugin_path = find_lib()
File "C:\Users\%USER%\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\vlc.py", line 166, in find_lib
dll = ctypes.CDLL('.\\' + libname)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\ctypes\__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
I also tried the fix by adding the following variables, and instead we would get a "Fail to find module" error
Create an environment variable called PYTHON_VLC_LIB_PATH
and set it to C:\Program Files\VideoLAN\VLC\libvlc.dll
Create another environment variable called PYTHON_VLC_MODULE_PATH
and set it to C:\Program Files\VideoLAN\VLC\
Upvotes: 0
Views: 97