推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
xioce
V2EX  ›  Python

新手, Python LXML 模块安装不了怎么办?

  •  
  •   xioce · Apr 25, 2016 · 5978 views
    This topic created in 3848 days ago, the information mentioned may be changed or developed.
    树莓派 3 中安装 LXML 模块一直报错:
    Cleaning up...
    Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-QHW_hf/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-7r9kI6-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-QHW_hf/lxml
    Storing debug log for failure in /root/.pip/pip.log

    求各位大大看看是怎么回事!
    10 replies  •  2016-04-26 19:49:50 +08:00
    ytmsdy
    ytmsdy
    Apr 25, 2016
    1
    下载 Anaconda 安装。。
    xioce
    xioce
    OP
    Apr 25, 2016
    2
    @ytmsdy 不行啊。。
    LINAICAI
    LINAICAI
    Apr 25, 2016
    3
    前几天也遇到过这个问题,各种包都安装不了,好像我更新下 pip 就好了
    Lihz
    Lihz
    Apr 25, 2016
    4
    你这截的错误信息真的是无力吐槽
    SmiteChow
    SmiteChow
    Apr 25, 2016
    5
    得贴`/root/.pip/pip.log `
    Zzzzzzzzz
    Zzzzzzzzz
    Apr 25, 2016
    6
    libxml2-dev 和 libxslt1-dev 装了没?
    hansnow
    hansnow
    Apr 25, 2016
    7
    先检查下依赖装好了没
    http://stackoverflow.com/questions/6504810/how-to-install-lxml-on-ubuntu

    如果依赖没问题的话可能是内存不够用, 512M 内存在不加 swap 的情况下应该是装不上的
    xiongdong57
    xiongdong57
    Apr 25, 2016
    8
    zhouxuchen
    zhouxuchen
    Apr 25, 2016 via Android
    9
    可能是依赖问题,前几天在 CentOS 上装 lxml 也装不上,后来刷了下 SF 装了 python-dev 和不知道个啥就搞定了。貌似就是 6 楼说的俩(逃
    fy
    fy
    Apr 26, 2016
    10
    lxml 在小设备上别用 pip 装啊,这个需要编译的,直接走包管理器
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1561 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 07:13 · PVG 15:13 · LAX 23:13 · JFK 02:13
    ♥ Do have faith in what you're doing.