search

Home  >  Q&A  >  body text

python - pip安装lxml失败

pip安装lxml库,试了很多次,都会卡在这里:

用top命令查看系统资源,发现物理内存基本耗尽,但是虚拟内存没怎么用:

该用什么办法安装lxml呢?服务器性能没办法改善了。

PHP中文网PHP中文网2808 days ago468

reply all(3)I'll reply

  • 迷茫

    迷茫2017-04-17 17:48:05

    After finding a machine with the same version and installing it, copy the lxml under site-package and you can use it^_^
    The premise is that the target machine has libxml2, libxslt, libxml2-devel, libxslt installed -devel.

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 17:48:05

    I don’t know what your specific problem is. Here are my installation steps:

    apt-get install libxml2-dev, libxslt1-dev, python-dev
    pip install lxml

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 17:48:05

    lxml installation takes a long time, more than 10 minutes, it is recommended to wait longer.

    reply
    0
  • Cancelreply