环境
- python
- pip
- 把python加入到环境变量中
方法一
使用pip
输入命令pip install lxml
呃呃,一般都是各种原因无法安装如:Could not find a version that satisfies the requirement lxml (from versions: )No matching distribution found for lxml等等
方法二
遇到这种情况我们可以通过lxml的.whl文件来进行安装
1.我们先安装wheel库然后才能安装.whl文件
输入命令pip insall wheel
2.有可能你输入命令还是无法安装whell,这个时候就需要我们进行手动下载了
下载地址:https://pypi.org/project/wheel/#modal-close
3.安装下载的wheel,进入cmd输入相应的命令
pip install path(path指的是你存放wheel的路径)
4.使用命令查看版本信息:
import pip;print(pip.pep425tags.get_supported())