Error when importingPython-vlc

只愿长相守 提交于 2019-12-13 07:28:31

问题


I have installed python-vlc

D:\Programing\Python\Python 3.6>python -m pip install python-vlc Requirement already satisfied: python-vlc in d:\programing\python\python 3.6\lib\site-packages\python_vlc-1.1.2-py3.6.egg

When I import the module in idle I get this error

>>> import vlc
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
  import vlc
File "<frozen importlib._bootstrap>", line 961, in _find_and_load
File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 646, in _load_unlocked
File "<frozen importlib._bootstrap>", line 616, in _load_backward_compatible
File "D:\Programing\Python\Python 3.6\lib\site-packages\python_vlc-1.1.2-py3.6.egg\vlc.py", line 181, in <module>
dll, plugin_path  = find_lib()
File "D:\Programing\Python\Python 3.6\lib\site-packages\python_vlc-1.1.2-py3.6.egg\vlc.py", line 156, in find_lib
dll = ctypes.CDLL(libname)
File "D:\Programing\Python\Python 3.6\lib\ctypes\__init__.py", line 344, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found

I am running Python 3.6.0 in windows 10 64x


回答1:


If you have 64bit python, you need 64bit vlc player. If you have 32bit python, you need 32bit vlc version.




回答2:


Try the command "pip install vlc" in the CMD. If that doesn't work, then try "pip install python-vlc"



来源:https://stackoverflow.com/questions/42105208/error-when-importingpython-vlc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!