V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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 · 2016-04-25 16:34:54 +08:00 · 4834 次点击
    这是一个创建于 2941 天前的主题,其中的信息可能已经有所发展或是发生改变。
    树莓派 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 条回复    2016-04-26 19:49:50 +08:00
    ytmsdy
        1
    ytmsdy  
       2016-04-25 16:38:11 +08:00
    下载 Anaconda 安装。。
    xioce
        2
    xioce  
    OP
       2016-04-25 16:55:35 +08:00
    @ytmsdy 不行啊。。
    LINAICAI
        3
    LINAICAI  
       2016-04-25 17:12:47 +08:00
    前几天也遇到过这个问题,各种包都安装不了,好像我更新下 pip 就好了
    Lihz
        4
    Lihz  
       2016-04-25 17:15:08 +08:00
    你这截的错误信息真的是无力吐槽
    SmiteChow
        5
    SmiteChow  
       2016-04-25 17:18:47 +08:00
    得贴`/root/.pip/pip.log `
    Zzzzzzzzz
        6
    Zzzzzzzzz  
       2016-04-25 17:20:27 +08:00
    libxml2-dev 和 libxslt1-dev 装了没?
    hansnow
        7
    hansnow  
       2016-04-25 18:14:15 +08:00
    先检查下依赖装好了没
    http://stackoverflow.com/questions/6504810/how-to-install-lxml-on-ubuntu

    如果依赖没问题的话可能是内存不够用, 512M 内存在不加 swap 的情况下应该是装不上的
    xiongdong57
        8
    xiongdong57  
       2016-04-25 18:45:52 +08:00
    zhouxuchen
        9
    zhouxuchen  
       2016-04-25 19:31:51 +08:00 via Android
    可能是依赖问题,前几天在 CentOS 上装 lxml 也装不上,后来刷了下 SF 装了 python-dev 和不知道个啥就搞定了。貌似就是 6 楼说的俩(逃
    fy
        10
    fy  
       2016-04-26 19:49:50 +08:00
    lxml 在小设备上别用 pip 装啊,这个需要编译的,直接走包管理器
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2852 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 15:45 · PVG 23:45 · LAX 08:45 · JFK 11:45
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.