Siv*_*lam 13 python pycrypto python-2.7
我试图从Python 2.7.10 64位Windows版本的源代码编译pycrypto-2.6.1并面临以下错误.
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
Run Code Online (Sandbox Code Playgroud)
谷歌搜索没有多大帮助.任何有关这方面的帮助将不胜感激.
PS我不是在寻找预先编译的二进制文件.要求是从源代码构建它.
看起来您的链接器找不到python27.lib库.
LIB和LIBPATH是链接器和编译器正在使用的Windows环境变量.
你的计算机上有python27.lib在哪个文件夹中?
请确认LIB环境变量包含python27.lib的路径
如果它没有解决您的问题 - 尝试将python27.lib路径也添加到LIBPATH
做以下工作对我有用: