proxy_pool icon indicating copy to clipboard operation
proxy_pool copied to clipboard

lxml版本建议

Open hzexe opened this issue 3 years ago • 0 comments

lxml使用的4.3.1,通常仓库都没有这个版本,使用pip安装是编译,有很多坑要填.况且很多低功耗CPU的小型设备没这么全的开发环境,编译时间长. .我填过的坑:

  • wheel安装各种坑
  • 缺少python开发包
  • 缺少zlib开发包
  • pip版本低

就为了这么个库耗费大量时间不值得.在debian/ubuntu的仓库都存在这个包,只是版本对不上,没这么老.debian仓库的版本是4.6.2

root@T1:~/proxy_pool# apt-cache madison  python3-lxml
python3-lxml | 4.6.2-1~bpo10+1 | https://mirrors.huaweicloud.com/debian buster-backports/main arm64 Packages

附上在斐讯T1(ARMv8 8核)编译lxml用的时间:

root@T1:~/proxy_pool# time pip3 install lxml==4.3.1 -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting lxml==4.3.1
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/0f/bd/bb1464d1f363dbd805862c8a1ea258b9a4f4d2049c376d1c4790b6545691/lxml-4.3.1.tar.gz
Building wheels for collected packages: lxml
  Running setup.py bdist_wheel for lxml ... done
  Stored in directory: /root/.cache/pip/wheels/1d/f7/5c/92c8eaa0d1497f9f9387d005bc41a0450ceebf26a2082b86d3
Successfully built lxml
Installing collected packages: lxml
  Found existing installation: lxml 4.3.2
    Not uninstalling lxml at /usr/lib/python3/dist-packages, outside environment /usr
    Can't uninstall 'lxml'. No files were found to uninstall.
Successfully installed lxml-4.3.1

real    19m34.503s
user    19m7.888s
sys     0m13.758s

hzexe avatar Jan 24 '21 06:01 hzexe