致命错误LNK1181:无法打开安装cx_Freeze的输入文件'imagehlp.lib'

问题描述 投票:0回答:1

我正在尝试使用以下命令在python 3.4上安装cx_Freeze:

pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org --trusted-host pypi.python.org cx_freeze

但是,我收到了错误

creating build\temp.win-amd64-3.4\Release\source 
C:\VS10\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG - IC:\Python34\include -IC:\Python34\include /Tcsource/util.c /Fobuild\temp.win-amd64-3.4\Release\source/util.obj 
util.c 
C:\VS10\VC\Bin\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\Python34\libs /LIBPATH:C:\Python34\PCbuild\amd64 imagehlp.lib Shlwapi.lib /EXPORT:PyInit_util build\temp.win-amd64-3.4\Release\source/util.obj /OUT:build\lib.win-amd64-3.4\cx_Freeze\util.pyd /IMPLIB:build\temp.win-amd64-3.4\Release\source\util.lib     /MANIFESTFILE:build\temp.win-amd64-3.4\Release\source\util.pyd.manifest 
LINK : fatal error LNK1181: cannot open input file 'imagehlp.lib' 
error: command 'C:\VS10\VC\Bin\link.exe' failed with exit status 1181

任何想法如何解决这个问题?

python-3.x cx-freeze
1个回答
0
投票

cx_Freeze的当前/默认版本是5.1.1,它仅支持Python 2.7,3.5和3.6。

支持Python 3.4的cx_Freeze的最新版本是5.0.2。参见cx_Freeze release notescx-freeze tag info。所以你可能应该试试

pip install [...] cx_Freeze==5.0.2

其中[...]代表安装命令的附加选项。

我不确定版本的这种不兼容性是否是您报告的特定错误的根本原因,但它会在您的项目中的某个时刻引起问题。

© www.soinside.com 2019 - 2024. All rights reserved.