python no module name _lzma,安装/编译pylzma(LZMA Python绑定)

在Windows 7 x64环境下,使用Python 2.6.6 x64和AMD64编译器尝试安装pylzma时遇到了编译和链接错误。将.c文件更改为.cpp并修改setup.py后,虽然解决了编译问题,但链接阶段出现了未解析的外部符号。通过调整变量声明和添加链接器标志'/MANIFEST'成功解决了问题,使得pylzma能用MSVC在Python 2.4-2.7 32位和2.6-2.7 64位上编译通过。
摘要由CSDN通过智能技术生成

I've already posted this question on the authors website, but I thought I might ask here as well.

I've been trying to install pylzma with this setup:

Windows 7 x64

Python 2.6.6 x64

the amd64 compiler coming from windows server 2003 sdk

cloned the git repo git://github.com/fancycode/pylzma.git

With a simple easy_install pylzma I got this:

cl : Command line warning D9025 :

overriding '/MD' with '/MT' pylzma.c

src/pylzma/pylzma.c(85) : warning

C4244: '=' : conversion from

'Py_ssize_t' to 'int', possible loss

of data

src/pylzma/pylzma.c(102) : error

C2275: 'CSha256' : illegal use of this

type as an expression

c:\users\xavier.lapointe\appdata\local\temp\easy_install-2mfkqu\pylzma-0.4.3\src\pylzma../7zip/C/Sha256.h(18)

: see declaration of 'CSha256'

src/pylzma/pylzma.c(102) : error

C2146: syntax error : missing ';'

before identifier 'sha'

src/pylzma/pylzma.c(102) : error

C2065: 'sha' : undeclared identifier

src/pylzma/pylzma.c(103) : error

C2065: 'sha' : undeclared identifier

src/pylzma/pylzma.c(103) : warning

C4133: 'function' : incompatible types

- from 'int *' to 'CSha256 *'

src/pylzma/pylzma.c(104) : error

C2143: syntax error : missing ';'

before 'type'

src/pylzma/pylzma.c(105) : error

C2143: syntax error : missing ';'

before 'type'

src/pylzma/pylzma.c(106) : error

C2143: syntax error : missing ';'

before 'type'

src/pylzma/pylzma.c(107) : error

C2143: syntax error : missing ';'

before 'type'

src/pylzma/pylzma.c(108) : error

C2065: 'round' : undeclared identifier

src/pylzma/pylzma.c(108) : error

C2065: 'round' : undeclared identifier

src/pylzma/pylzma.c(108) : error

C2065: 'rounds' : undeclared

identifier

src/pylzma/pylzma.c(108) : error

C2065: 'round' : undeclared identifier

src/pylzma/pylzma.c(109) : error

C2065: 'sha' : undeclared identifier

src/pylzma/pylzma.c(109) : warning

C4133: 'function' : incompatible types

- from 'int *' to 'CSha256 *'

src/pylzma/pylzma.c(110) : error

C2065: 'sha' : undeclared identifier

src/pylzma/pylzma.c(110) : warning

C4133: 'function' : incompatible types

- from 'int *' to 'CSha256 *'

src/pylzma/pylzma.c(1

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值