pip3不会为VLC

时间:2016-04-20 08:56:39

标签: python python-3.x vlc

似乎无法获得VLC功能的Python3绑定。 我正在做pip3 install python_vlc,结果是:

Collecting python-vlc
Installing collected packages: python-vlc
Successfully installed python-vlc-1.1.2

所以,当我import vlc时,它会给我以下错误:

>>> import vlc
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/site-packages/vlc.py", line 173, in <module>
    dll, plugin_path  = find_lib()
  File "/usr/local/lib/python3.5/site-packages/vlc.py", line 165, in find_lib
    dll = ctypes.CDLL('libvlc.dylib')
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ctypes/__init__.py", line 347, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(libvlc.dylib, 6): image not found

我尝试在网上寻找解决方案,但似乎无法找到原因。

1 个答案:

答案 0 :(得分:0)

好吧,所以我发现了问题...... 我尝试通过pip3 uninstall python-vlc卸载python-vlc并使用AppZapper卸载VLC应用程序以完全删除所有内容。在此之后我重新安装它,它工作,所以我现在可以在命令行中import vlc

更新:所以在我这样做后,我遇到了另一个问题。我收到了这个错误:core libvlc error: No plugins found! Check your VLC installation. 在我的.bash_profile中添加了以下行: export VLC_PLUGIN_PATH=$VLC_PLUGIN_PATH:/Applications/VLC.app/Contents/MacOS/plugins 修好了它。