lxml python 2.7_无法在python2.7中安装lxml

我试图在一个virtualenv中安装lxml与sudo pip install lxml以及sudo pip install –upgrade lxml但在以下两种情况下获得以下内容:

x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,

relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes

-D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat

-Werror=format-security build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -lxslt

-lexslt -lxml2 -lz -lm -o build/lib.linux-x86_64-2.7/lxml/etree.so

/usr/bin/ld: cannot find -lz

collect2: error: ld returned 1 exit status

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------

Cleaning up...

Command /usr/bin/python -c "import setuptools,

tokenize;__file__='/tmp/pip_build_root/lxml/setup.py';

exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'),

__file__, 'exec'))" install --record /tmp/pip-nmFOYf-record/install-record.txt

--single-version-externally-managed --compile failed with error code 1 in

/tmp/pip_build_root/lxml

Storing debug log for failure in /root/.pip/pip.log

我已经尝试了所有发布的解决方案here,这意味着我安装了libxml2-dev,libxslt-dev和python-dev,并且我还安装了build-essential

我目前正在运行Linux Mint 17 Debian Based,它使用apt-get作为包管理器.

python-lxml已经预装好了.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值