本文介绍了链接:致命错误 LNK1104:无法打开文件“python27.lib"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从 Python 2.7.10 64 位 Windows 版本的源代码编译 pycrypto-2.6.1 并面临以下错误.

I was trying to compile pycrypto-2.6.1 from source for Python 2.7.10 64-Bit Windows Version and facing the following error.

Processing pycrypto-2.6.1.tar.gz
Writing c:\users\sivasuba\appdata\local\temp\easy_install-ecznz_\pycrypto-2.6.1\setup.cfg
Running pycrypto-2.6.1\setup.py -q bdist_egg --dist-dir c:\users\sivasuba\appdata\local\temp\easy_install-ecznz_\pycrypto-2.6.1\egg-dist-tmp-us3gka
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
winrand.c
LINK : fatal error LNK1104: cannot open file 'python27.lib'
error: Setup script exited with error: command 'C:\\Users\\sivasuba\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\link.exe' failed with exit status 1104

谷歌搜索没有多大帮助.对此的任何帮助将不胜感激.

Googling didn't help much. Any help on this would be appreciated.

附言我不是在寻找预编译的二进制文件.要求是从源代码构建它.

P.S. I am not looking for pre-complied binaries. The requirement is to build it from source.

推荐答案

您的链接器似乎没有找到 python27.lib 库.

It seems like your linker doesn't find python27.lib library.

LIB 和 LIBPATH 是链接器和编译器正在使用的 Windows 环境变量.

LIB and LIBPATH are windows environment variables which are being used by the linker and compiler.

你电脑上的python27.lib在哪个文件夹?

In which folder do you have python27.lib on your computer?

请确认 LIB 环境变量包含 python27.lib 的路径

please confirm that LIB environment variable include the path for the python27.lib

如果它没有解决您的问题 - 尝试将 python27.lib 路径也添加到 LIBPATH

If it didn't solve your problem - try adding python27.lib path also to LIBPATH

这篇关于链接:致命错误 LNK1104:无法打开文件“python27.lib"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 08:41