当我尝试使用array = [
{
"heading": "Fruits",
"contents": [
{ "name": "Apple", "count": 12 }
]
},
{
"heading": "Vegetables",
"contents": [
{ "name": "Tomato", "count": 18 }
]
}
];
在Windows 10上为python 3.5安装 lxml 时,我收到如下错误消息:
pip install lxml
问题是我无法弄清楚如何安装libxml2,因为libxml2的安装文件返回"b" 'xslt-config' is nor recognized as an external or internal command,
\r\noperable program or batch file.\r\n" ** make sure the developement
packages of libxml2 and libxslt are installed **
关于如何解决这些问题的任何建议?
答案 0 :(得分:0)
您无法从源代码编译lxml而无需依赖链接库,以及工作工具链(需要在Windows上为您的python版本提供Visual Studio的匹配版本)
从here下载预编译的二进制轮。
使用pip安装它:
pip install path-to-lxml-3.6.4-cp35-cp35m-win_amd64.whl