python pip 安装lxml,报错Unable to find vcvarsall.bat,(windows)

来源:互联网 发布:建行网络学系统 - 百度 编辑:程序博客网 时间:2024/04/23 18:24
作者:深海鱼
链接:http://www.zhihu.com/question/26857761/answer/69754633
来源:知乎
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

1. 安装wheel,命令行运行:

pip install wheel

2.在这里下载对应的.whl文件,注意别改文件名!

lfd.uci.edu/~gohlke/pyt

Ctrl + F,输入lxml,找到下面这段

Lxml, a binding for the libxml2 and libxslt libraries.
lxml‑3.4.4‑cp27‑none‑win32.whl
lxml‑3.4.4‑cp27‑none‑win_amd64.whl
lxml‑3.4.4‑cp33‑none‑win32.whl
lxml‑3.4.4‑cp33‑none‑win_amd64.whl
lxml‑3.4.4‑cp34‑none‑win32.whl
lxml‑3.4.4‑cp34‑none‑win_amd64.whl
lxml‑3.4.4‑cp35‑none‑win32.whl
lxml‑3.4.4‑cp35‑none‑win_amd64.whl
cp后面是Python的版本号,27表示2.7,根据你的Python版本选择下载。


3. 进入.whl所在的文件夹,执行命令即可完成安装

pip install 带后缀的完整文件名
失败原因参考:http://stackoverflow.com/questions/19830942/pip-install-gives-error-unable-to-find-vcvarsall-bat
pip命令针对的是二进制文件
0 0
原创粉丝点击