无法在Ubuntu中安装LXML Verison 3.3.5 [英] Not able to install lxml verison 3.3.5 in ubuntu

查看:400
本文介绍了无法在Ubuntu中安装LXML Verison 3.3.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序中使用openpyxl python软件包.使用相同的消息时,我收到以下消息.

I am using openpyxl python package in my application. I am getting the following message when using the same.

/usr/local/lib/python2.7/dist-packages/openpyxl/ init .py:31: UserWarning:lxml的安装版本太旧,无法与 openpyxl

/usr/local/lib/python2.7/dist-packages/openpyxl/init.py:31: UserWarning: The installed version of lxml is too old to be used with openpyxl

warnings.warn("lxml的安装版本太旧,无法与openpyxl一起使用")

warnings.warn("The installed version of lxml is too old to be used with openpyxl")

Openpyxl需要lxml 3.2.5或更高版本,并且我的计算机中的版本是3.2.0.当我尝试将lxml升级到最新版本时,即 3.3.5,它被以下消息打断.

Openpyxl requires lxml version 3.2.5 or above, and the version in my machine is 3.2.0. When I try to upgrade lxml to the latest version ie 3.3.5, it is getting interrupted with the following message.

i686-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -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-i686-2.7/src/lxml/lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.linux-i686-2.7/lxml/etree.so

/usr/bin/ld: cannot find -lz

collect2: error: ld returned 1 exit status

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

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

  Rolling back uninstall of lxml

  Replacing /usr/lib/python2.7/dist-packages/lxml
  Replacing /usr/lib/python2.7/dist-packages/lxml-3.2.0.egg-info
Cleaning up...

  Removing temporary dir /tmp/pip_build_root...
Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip_build_root/lxml/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ov0PUy-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip_build_root/lxml

我需要帮助来解决问题.

I need help in resolving the issue.

PS:-我已经在我的机器上安装了lxml依赖包python-dev,libxml2-dev和libxslt1-dev.

PS:- I have already installed lxml dependent packages python-dev, libxml2-dev and libxslt1-dev in my machine.

推荐答案

我认为您缺少的是zlib1g-dev.

I think what you're missing is zlib1g-dev.

sudo apt-get install zlib1g-dev

运行以上命令将解决此问题.

Running above command will solve the issue.

这篇关于无法在Ubuntu中安装LXML Verison 3.3.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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