Could not find a version that satisfies the requirement lxml解决方法

  • 2020 年 2 月 25 日
  • 笔记

今天ytkah在安装lxml时提示错误ERROR: Could not find a version that satisfies the requirement lxml (from versions: none),ERROR: No matching distribution found for lxml,升级一下pip试试

python -m pip install --upgrade pip

  再次安装lxml还是错误,考虑到是网络不稳定的问题,这时我们用国内的镜像源来加速

pip install 包名-i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

  –trusted-host pypi.douban.com 这是为了获得ssl证书的认证

执行成功!

不过每次这样手动输入会比较麻烦,建议每次换系统时先换成国内的镜像源,具体配置请参考https://blog.csdn.net/u012592062/article/details/51966649