python3 安装 libxml2

18 篇文章 2 订阅

command: pip install libxml2-python3

errors:

Collecting libxml2-python3
  Using cached libxml2-python3-2.9.5.tar.gz (216 kB)
  Preparing metadata (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /root/nas_env/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-nbhozwjb/libxml2-python3_8b4299bc0b3e4a9e8394247cbf279f45/setup.py'"'"'; __file__='"'"'/tmp/pip-install-nbhozwjb/libxml2-python3_8b4299bc0b3e4a9e8394247cbf279f45/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-lbo5ien2
       cwd: /tmp/pip-install-nbhozwjb/libxml2-python3_8b4299bc0b3e4a9e8394247cbf279f45/
  Complete output (1 lines):
  failed to find headers for libxml2: update includes_dir
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/41/97/a2ecf6c5b291799dbd40b3d041d89b0ecdb1b43c8c2503e27991325851cd/libxml2-python3-2.9.5.tar.gz#sha256=51a6f863b639ce89cdfed32d58d9d37066301c373247f1c370b10d7edebe5e65 (from https://pypi.org/simple/libxml2-python3/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement libxml2-python3 (from versions: 2.9.5)
ERROR: No matching distribution found for libxml2-python3

因为找不到libxml2头文件

解决办法: yum install libxml2-devel

重新 安装即可

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值