-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error When Importing VLC #140
Comments
@pjeanjean do you have an idea? Since this occurs on windows (that I do not use) and seems to be impacted by your patch. |
From the message, I am guessing that VLC is not installed on the computer (or at least that the install path was not found from the registry), and python-vlc resorted to try and get the dll from the working directory. I would like to look a bit more into it, but I don't have my Windows computer with me at the moment. In the meantime:
Please note that this command will not install VLC, but only this Python library, and you need to install VLC independently. |
Yes, I have installed vlc separately before I installed the vlc python module. I am running windows 10. |
Sorry, accidently closed issue. |
Can you check your registry? In your case, the registry key is not found, and the direct lookup also fails (where is VLC installed, and can you see the dll in the directory?) |
Hi, for me, it is located in "C:\Program Files (x86)\VideoLAN\VLC\libvlc.dll". |
Well, as a temporary workaround you could put the dll inside Last question (for now): did you install VLC through the official installer, or did you use some kind of package manager (Microsoft Store, choco, ...)? I will try to reproduce this issue when I have access to my Windows computer. (I guess that adding |
I have used the official installer. It is not urgent, so I will wait for a bug fix. |
Any update on this? The error still happens. Do I need to upgrade python to Python 3.8.5 instead of Python 3.8.3.? |
Sorry, I forgot all bout this but I'll make a PR this evening to fix it. |
Oh, okay, thank you so much. |
Just to be sure, could you try with this commit? |
I tried doing
|
Close, run setup.py from |
The first time I import it, I get this error:
The second time I import it, it gives me this error:
BTW: it says it's installed in c:\users\ketha\appdata\local\programs\python\python38\lib\site-packages\python_vlc-3.0.11114-py3.8.egg |
Weird, this time it actually found the dll but couldn't load it. |
No, I am using python 64bit. I downloaded the 64bit version from python.org, and it is located in python38 not python38-32 |
Oh, so maybe the issue is that your version of vlc is 32bits while your Python is 64 (which would also explain why it is installed in |
Well, mine is:
And the website has both options for download |
Okay, thanks. |
I am using 64-bit python 3.8.3. I have install vlc using
pip install python-vlc
. I am getting the following error:Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> import vlc File "C:\Users\--\AppData\Local\Programs\Python\Python38\lib\site-packages\vlc.py", line 210, in <module> dll, plugin_path = find_lib() File "C:\Users\--\AppData\Local\Programs\Python\Python38\lib\site-packages\vlc.py", line 170, in find_lib dll = ctypes.CDLL('.\\' + libname) File "C:\Users\--\AppData\Local\Programs\Python\Python38\lib\ctypes\__init__.py", line 373, in __init__ self._handle = _dlopen(self._name, mode) FileNotFoundError: Could not find module 'C:\Users\--\AppData\Local\Programs\Python\Python38\libvlc.dll' (or one of its dependencies). Try using the full path with constructor syntax.
Edit: I am using Windows, and I have installed VLC before installing the python module.
The text was updated successfully, but these errors were encountered: