VLC和Python体系结构兼容性问题 [英] VLC and Python architecture comatibility issue

查看:133
本文介绍了VLC和Python体系结构兼容性问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用python 2.7解释器打开 vlc.py 时,它起作用,但是当我使用python 3.4解释器打开时,它不起作用。我收到以下错误。

When I open vlc.py with the python 2.7 interpreter it works, but when I open it with the python 3.4 interpreter it doesn't work. I get the below error.

我很确定问题是我的python 3.4(conda中为64bit)和python 2.7(conda中不是32bit)的体系结构是不同的),因此 vlc.py 仅适用于我的python 2.7。

I am pretty sure the issue is that the architecture is different for my python 3.4 (64bit in conda) and python 2.7 (32bit not in conda), so vlc.py will only work with my python 2.7.

我知道,当Python版本和VLC兼容时,即 32位Python体系结构,效果很好。但是,我无法在conda中创建这种架构,因为conda根是64位。即使我在conda中创建了一个新环境并在其中安装Python 2,其根目录仍然是64位。

I understand that when the Python version and VLC are compatible, i.e. 32bit Python architecture, it works fine. But, I can't create this architecture in my conda because my conda root is 64bits. Even if I create a new environment in conda and install Python 2 there, the root will still be 64bit. I tried this and it doesn't work.

由于某些原因,VLC似乎仅在平台体系结构为32位时才起作用。我只是无法解决这个问题。

For some reason, VLC only seems to work when the platform architecture is 32bit. I just can't wrap my head around this issue.

Traceback (most recent call last):
  File "C:\Users\Acer\Desktop\VLC Player\Main.py", line 28, in <module>
    import vlc
  File "C:\Users\Acer\Desktop\VLC Player\vlc.py", line 175, in <module>
    dll, plugin_path  = find_lib()
  File "C:\Users\Acer\Desktop\VLC Player\vlc.py", line 152, in find_lib
    dll = ctypes.CDLL('libvlc.dll')
  File "C:\Users\Acer\Miniconda3\envs\updated\lib\ctypes\__init__.py", line 347, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found


推荐答案

当前,您的32位VLC与32位python配合使用(恰好是2.7)

Currently your 32bit VLC works with your 32bit python (which happens to be 2.7)

卸载32位VLC,然后下载64位VLC。现在可以在64位python(恰好是3.4)上使用。

Uninstall your 32bit VLC, and download 64bit VLC. It'll work with 64bit python (which happens to be 3.4) now.

这篇关于VLC和Python体系结构兼容性问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆