pip 如何在 windows 7 x64、python 2.7 上安装 pylzma [英] How pip install pylzma on windows 7 x64 , python 2.7

查看:35
本文介绍了pip 如何在 windows 7 x64、python 2.7 上安装 pylzma的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为这应该是开箱即用的,但是......

我已将 pip.log 粘贴到 pastbin错误信息的最后几行是

e:Program Files (x86)Microsoft Visual Studio 9.0VCBINamd64cl.exe/c/nologo/Ox/MD/W3/GS-/DNDEBUG -DWITH_COMPAT=1 -DCOMPRESS_MF_MT=1 -Isrc/sdk -IC:Python27include -IC:Python27PC/Tcsrc7zipCAesOpt.c/Fobuild	emp.win-amd64-2.7Releasesrc7zipCAesOpt.obj/MTcl:命令行警告 D9025:用/MT"覆盖/MD"AesOpt.csrc7zipCAesOpt.c(14):致命错误 C1083:无法打开包含文件:'wmmintrin.h':没有这样的文件或目录错误:命令 '"e:Program Files (x86)Microsoft Visual Studio 9.0VCBINamd64cl.exe"' 失败,退出状态为 2

通过谷歌搜索,我发现 wmmintrin.h 是 vc 10.0 附带的头文件之一,我已经安装了 Visual Studio 2010(包含 vc 10.0),我需要做的是复制这个文件吗?

pip install 不是应该简单无痛的吗?

我试图将此文件复制到 vc9 的包含路径中,但遇到了几个不同的错误

我已阅读此安装/编译 pylzma(lzma python 绑定)

似乎作者已经修复了 setup.py 和 .c 文件中的内容.我看到/MANIFEST 标志和 Py_BEGIN_ALLOW_THREADS 和 Sha256_Init(&sha) 已在变量声明后移动:

edit2:似乎 vs2008(vc9) 不支持 编译器内在函数 如错误日志中所示,在我安装了 vs2008 sp1 后,它编译没有任何错误......请参阅 日志

解决方案

我强烈建议通过 Windows 二进制文件安装.它可以在 http://www.lfd.uci.edu/~gohlke 找到/pythonlibs/#pylzma.这样,您就不必担心愚蠢的 make 错误.相信我,你会浪费时间 &能源与但是您不会通过尝试使 Visual Studio 错误消失而获得任何好处.但是,如果您确实通过这种方式获得了成功,请在此处发布相关答案!

I assumed this should be working out of the box, but ...

i've pasted pip.log on pastbin the last few lines of error message is

e:Program Files (x86)Microsoft Visual Studio 9.0VCBINamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWITH_COMPAT=1 -DCOMPRESS_MF_MT=1 -Isrc/sdk -IC:Python27include -IC:Python27PC /Tcsrc7zipCAesOpt.c /Fobuild	emp.win-amd64-2.7Releasesrc7zipCAesOpt.obj /MT

cl : Command line warning D9025 : overriding '/MD' with '/MT'

AesOpt.c

src7zipCAesOpt.c(14) : fatal error C1083: Cannot open include file: 'wmmintrin.h': No such file or directory

error: command '"e:Program Files (x86)Microsoft Visual Studio 9.0VCBINamd64cl.exe"' failed with exit status 2

via google search i found that wmmintrin.h is one of the headers comes with vc 10.0, i've installed visual studio 2010 ( contains vc 10.0 ), what i need to do is copy this file over ?

isn't pip install something supposed to be simple and painless ?

edit: i tried to copy this file into vc9's include path, but came across several different errors

i have read this Installing/compiling pylzma (lzma python binding)

it seems author has fix what in the setup.py and .c file already. i saw the /MANIFEST flag and Py_BEGIN_ALLOW_THREADS and Sha256_Init(&sha) have been moved after variable declarations:

edit2: it seems vs2008(vc9) doesn't support the compiler intrinsics as seen in the error log, after i installed vs2008 sp1, it compiles without any error ... see log

解决方案

I would strongly recommend installing via a windows binary. It can be found at http://www.lfd.uci.edu/~gohlke/pythonlibs/#pylzma. This way, you don't have to worry about the stupid make errors. Trust me, you'ld waste time & energy & yet you wouldn't reap any benefits by trying to make the Visual Studio errors go away. But, if you do get success that way, please post the relevant answer here!

这篇关于pip 如何在 windows 7 x64、python 2.7 上安装 pylzma的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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