安装hachoirmetadata引发异常

2024-03-28 22:32:43 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试使用pip安装包hachoir-metadata

pip install hachoir-metadata

在执行上述命令之后,我得到了错误

C:\Users\Dimitar>pip install hachoir-metadata Downloading/unpacking hachoir-metadata Running setup.py (path:C:\Users\Dimitar\AppData\Local\Temp\pip_build_Dimitar\h achoir-metadata\setup.py) egg_info for package hachoir-metadata Traceback (most recent call last): File "", line 17, in File "C:\Users\Dimitar\AppData\Local\Temp\pip_build_Dimitar\hachoir-metada ta\setup.py", line 65 except OSError, err: ^ SyntaxError: invalid syntax Complete output from command python setup.py egg_info: Traceback (most recent call last):

File "", line 17, in

File "C:\Users\Dimitar\AppData\Local\Temp\pip_build_Dimitar\hachoir-metadata\s etup.py", line 65

except OSError, err:

              ^

SyntaxError: invalid syntax

下载的文件是Pypi中正确的文件。从日志中:

Using version 1.3.3 (newest of versions: 1.3.3, 1.3.2, 1.3.1, 1.3, 1.2.1, 1.2, 1.1, 1.0.1, 1.0) Downloading from URL https://pypi.python.org/packages/source/h/hachoir-metadata/hachoir-metadata-1.3.3.tar.gz#md5=26e04a2395205d31469fc2d6935055a9 (from https://pypi.python.org/simple/hachoir-metadata/)

我打开了hachoir元数据文件\设置.py要查看第65行有什么问题:

    command = ["pyuic4", "-o", dialog_python, dialog + ".ui"]
    try:
        exitcode = call(command)
    except OSError, err:
        exitcode = 1

但由于我已经使用Python一个小时了,上面的几行不能告诉我更多的信息。我的猜测是我丢失了一些其他的包,这些包需要在安装hachoir元数据之前安装好?提前谢谢。在


Tags: pippybuildlocalsetuplinecallusers