转载自:http://blog.csdn.net/wang1144/article/details/42277179

在ubuntu14.04版本上安装lxml,老是出错,在一番艰辛的搜索之后 ,终于找出了安装的正确方法,其实也就是没有将依赖包装全:

sudo apt-get install libxml2-dev libxslt1-dev python-dev
sudo apt-get install zlib1g-dev
sudo apt-get install libevent-dev
sudo pip install lxml

中途执行pip install lxml可能遇到识别不正确的情况,需要apt-get update一下方可继续

参考网址:

http://lxml.de/installation.html

http://blog.marchtea.com/archives/104

http://blog.marchtea.com/archives/91

下面是之前的参考,也可能会安装成功

sudo apt-get install Python-twisted-web python2.7-dev

安装 pip :

$ wget https://bootstrap.pypa.io/get-pip.py
... $ sudo python get-pip.py install

使用 pip 安装/升级 lxml(升至 3.3.5) 时出现以下报错:

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

这是因为一些依赖包没有安装,可以使用以下命令更新依赖包:

$sudo apt-get build-dep python-lxml

在更新完依赖包后,再次执行 pip 安装:

$ sudo pip install lxml --upgrade

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1的更多相关文章

  1. Centos4.3安装MySQL-python-1.2.3,出现error: command 'gcc' failed with exit status 1

    在Linux Centos 4.3上安装MySQL-python-1.2.3的时候出现error: command 'gcc' failed with exit status 1, 具体原因是因为没有 ...

  2. error: command 'gcc' failed with exit status 1

    MacOS下想安装MySQL-Python,执行语句: sudo pip install MySQL-Python 遇到了如下错误信息: /Users/kaitlyn/anaconda3/envs/e ...

  3. pip error: command 'gcc' failed with exit status 1

    SWIG/_m2crypto_wrap.c:127:20: 致命错误:Python.h:没有那个文件或目录     #include <Python.h>                  ...

  4. mysql_config not found和error: command 'gcc' failed with exit status 1

    要想使python可以操作mysql 就需要MySQL-python驱动,它是python 操作mysql必不可少的模块. 下载地址:https://pypi.python.org/pypi/MySQ ...

  5. 【centos】 error: command 'gcc' failed with exit status 1

    原文连接http://blog.csdn.net/fenglifeng1987/article/details/38057193 用安装Python模块出现error: command 'gcc' f ...

  6. centos7 安装mysql--python模块出现EnvironmentError: mysql_config not found和error: command 'gcc' failed with exit status 1

    要想使python可以操作mysql 就需要MySQL-python驱动,它是python 操作mysql必不可少的模块. 下载地址:https://pypi.python.org/pypi/MySQ ...

  7. python安装模块的时候报错error: command 'gcc' failed with exit status 1

    [情况] 在写Python代码的时候,需要用到psutil模块,需要安装. 但是在安装时,报错:error: command 'gcc' failed with exit status 1 [解决步骤 ...

  8. pip安装模块时:error: command 'gcc' failed with exit status 1

    用安装python模块出现error: command 'gcc' failed with exit status 1 问题: gcc编译缺少模块 解决方法: yum install gcc libf ...

  9. python psutil 编译中断。 error: command 'gcc' failed with exit status 1

    error info [root@chenbj psutil-2.0.0]# python setup.py install running install running bdist_egg run ...

  10. pycuda installation error: command 'gcc' failed with exit status 1

    原文:python采坑之路 Setup script exited with error: command 'gcc' failed with exit status 1 伴随出现"cuda ...

随机推荐

  1. Leetcode: Lexicographical Numbers

    Given an integer n, return 1 - n in lexicographical order. For example, given 13, return: [1,10,11,1 ...

  2. Climbing Stairs - Print Path

    stair climbing, print out all of possible solutions of the methods to climb a stars, you are allowed ...

  3. cookie 使用笔记

    参考书<JSP Web 开发案例教程> index.jsp页面 dologin.jsp页面 welcome.jsp页面 页面显示 点击提交

  4. paper 10:支持向量机系列七:Kernel II —— 核方法的一些理论补充,关于 Reproducing Kernel Hilbert Space 和 Representer Theorem 的简介。

    在之前我们介绍了如何用 Kernel 方法来将线性 SVM 进行推广以使其能够处理非线性的情况,那里用到的方法就是通过一个非线性映射 ϕ(⋅) 将原始数据进行映射,使得原来的非线性问题在映射之后的空间 ...

  5. 对于Mybatis在C#.Net中个人使用的总结(一) Mybatis 的结果映射

    (图片中的文字上传之后就都看不清,我再图片的下边会用斜体字标清) 首先我在项目中使用Mybatis 是用XML完成映射的.至于XML这门语言,其实很简单的(对于入门来说,因为我是刚入门哈~),如果你还 ...

  6. MVC权限管理系统dwpro项目分配按钮没有显示的问题

    问题如下: 修改如下: 或者(原因为这个两个地方名要一致,大小写也要注意): 效果图:

  7. bash广播

    terminal1$: mkfifo script_name terminal2$: cat script_name terminal1$: script -f script_name 可以发广播到t ...

  8. String[] 转List<String>

    String[] 转List<String> String[] idArr = ids.split(","); List<String> idList = ...

  9. 夺命雷公狗---node.js---3commonJs 与 nodeJs的简介

    JavaScript是一个强大面向对象语言,它有很多快速高效的解释器.官方JavaScript标准定义的API是为了构建基于浏览器的应用程序.然而,并没有定于一个用于更广泛的应用程序的标准库. Com ...

  10. Logic and Fault simulation

    fault simulation是指对fault circuit的simulation,来locate manufacturing defects并且进行fault diagnosis. logic ...