带有LINK的Python pip安装:致命错误LNK1104:无法使用VC 2017打开文件'kernel32.lib' [英] Python pip install with LINK : fatal error LNK1104: cannot open file 'kernel32.lib' with VC 2017

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

问题描述

上周在此计算机上安装了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 > Options > Projects and Solutions > VC++ Directories,其中指出:

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.

Microsoft是否有可能基本上已经禁用了我通过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.

推荐答案

这对我很有帮助:

python -m pip install --upgrade pip setuptools wheel

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

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