在我的一台 Windows 7 开发计算机上,我尝试安装 Python 图像库。
我的机器也类似。两者都运行 Windows 7 Professional x64。两者都使用 Python 2.7.3(32 位)。在其中一台机器上pip install PIL
工作正常。另一方面,它失败,跟踪以此结束:
build\temp.win-amd64-2.7\Release\_imaging.pyd.manifest : general error c1010070:
Failed to load and parse the manifest. The system cannot find the file specified.
error: command 'mt.exe' failed with exit status 31
我该如何解决这个错误?
谢谢http://bugs.python.org/issue4431 http://bugs.python.org/issue4431,通过修改以下内容修复了此错误:
C:\<Python dir>\Lib\distutils\msvc9compiler.py
并添加:
ld_args.append('/MANIFEST')
在 MANIFESTFILE 行之后,它看起来像:
# Embedded manifests are recommended - see MSDN article titled
# "How to: Embed a Manifest Inside a C/C++ Application"
# (currently at http://msdn2.microsoft.com/en-us/library/ms235591(VS.80).aspx)
# Ask the linker to generate the manifest in the temp dir, so
# we can embed it later.
temp_manifest = os.path.join(
build_temp,
os.path.basename(output_filename) + ".manifest")
ld_args.append('/MANIFESTFILE:' + temp_manifest)
ld_args.append('/MANIFEST')
如果仍然出现错误,请更改if arg.startswith("/MANIFESTFILE:")
to if arg.startswith("/MANIFEST:")
in the manifest_get_embed_info(self, target_desc, ld_args)
method.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)