Python pip install with LINK:致命错误LNK1104:无法打开文件'kernel32.lib'与 VC 2017 [英] Python pip install with LINK : fatal error LNK1104: cannot open file 'kernel32.lib' with VC 2017

查看:60
本文介绍了Python pip install with LINK:致命错误LNK1104:无法打开文件'kernel32.lib'与 VC 2017的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

上周刚刚在这台计算机上安装了 Windows 7 Ultimate 和 Python.所以一切都是新鲜的.当我尝试 pip install

Just installed Windows 7 Ultimate and Python on this computer within the last week. So everything is fresh. When I try to pip install something as simple as

pip install twisted

它经历了整个过程,然后停滞不前并抱怨:

It goes through the process, then stalls out and complaints about:

 C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools
\MSVC\14.13.26128\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL
 /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\python36\libs 
/LIBPATHc:\python36\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft
Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.13.26128\lib\x64" "/LIBPATH:C:\Program Files((x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.13.26128\lib\x86" /EXPORT:PyIinit_raiser build\temp.win-amd64-3.6\Release
\src/twisted/test/raiser.obj /OUT:build\lib.win-amd64-3.6\twisted
\test\raiser.cp36-win_amd6.pyd /IMPLIB:build\temp.win0amd64-3.6\Release
\src/twisted/test\raiser.cp36-win_amd64.lib'

LINK: fatal error LNK1104: cannot open file 'kernel32.lib'

我已经搜索过了.我的驱动器上的各种文件夹中有 17 个 kernel32.lib 文件,这些文件已由我安装的所有编程套件等安装.

I've done a search. There are 17 kernel32.lib files in various folders on my drive that have been installed by all the programming suites etc I've installed.

我一直在研究这个,但找不到有效的解决方案.

I have been researching this and cannot find a solution that works.

重新安装 VC++ 2017 不起作用.安装适用于 Windows 7 的 Microsoft Windows SDK"不起作用.我尝试添加 "PATH"'s 以将文件定向到 kernel32.lib 并且这也不起作用.

Reinstalling VC++ 2017 doesn't work. Installing "Microsoft Windows SDK for Windows 7" doesn't work. I've tried adding "PATH"'s to direct the files to the kernel32.lib and that hasn't worked either.

当我打开 Visual Studio 时,转到 Tools >选项 >项目和解决方案 >VC++ 目录 它指出:

When I open Visual Studio, go to Tools > Options > Projects and Solutions > VC++ Directories it states:

VC++ Directories editing in Tools > Options has been deprecated.

VC++ Directories are now available as a user property sheet that is added by
default to all projects.

但我只是在 Python 中执行 pip install,我不是在制作 C++ 程序.

But I'm just doing a pip install in Python, I'm not making a C++ program.

微软是否有可能基本上禁用了我通过 pip install 使用这些文件的能力?

Is it possible Microsoft has basically disabled my ability to use these files from via a pip install?

我该如何解决这个问题,以便我可以正确安装我的软件包?

How do I fix this so I can install my packages properly?

这个问题不同于这个问题,因为那个问题是对于不同版本的 VS,该问题的答案不起作用或不适用.

This question is different from this question as that question was for different versions of VS and the answers to that question did not work and or did not apply.

推荐答案

我在 Windows 上 pip install nes_py 时遇到完全相同的错误,我能够通过添加 Windows 10 SDK (10.0.18362.0) 通过 Visual Studio 安装程序

I'm having the exact same error when pip install nes_py on windows, I was able to resolve it by adding Windows 10 SDK (10.0.18362.0) through Visual Studio Installer

这篇关于Python pip install with LINK:致命错误LNK1104:无法打开文件'kernel32.lib'与 VC 2017的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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