作者:深海鱼
链接:http://www.zhihu.com/question/26857761/answer/69754633
来源:知乎
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
链接:http://www.zhihu.com/question/26857761/answer/69754633
来源:知乎
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
1. 安装wheel,命令行运行:
pip install wheel
2.在这里下载对应的.whl文件,注意别改文件名!
http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
Ctrl + F,输入lxml,找到下面这段
Lxml, a binding for the libxml2 and libxslt libraries.cp后面是Python的版本号,27表示2.7,根据你的Python版本选择下载。
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
3. 进入.whl所在的文件夹,执行命令即可完成安装
pip install 带后缀的完整文件名
失败原因参考:http://stackoverflow.com/questions/19830942/pip-install-gives-error-unable-to-find-vcvarsall-bat
pip命令针对的是二进制文件