Linux 安装lxml及各种问题的解决

2021-01-13 14:20:15 浏览数 (1)

安装系统:

CentOS,redHat

步骤:

1.安装pip,已安装请忽视

wget --no-check-certificate https://github.com/pypa/pip/archive/1.5.5.tar.gz tar zvxf 1.5.5.tar.gz cd pip-1.5.5/ python setup.py install

2.安装依赖库,已安装请忽视

yum install libxml2

yum install libxslt-devel

3. 安装lxml

pip install lxml

问题解决:

1. 处理 error: command 'gcc' failed with exit status 1

yum install gcc python-devel

或者

yum install gcc libffi-devel python-devel openssl-devel

2. 处理 from setuptools import setup, find_packages ImportError: No module named set

wget http://peak.telecommunity.com/dist/ez_setup.py python ez_setup.py

0 人点赞