Cannot open include file: 'libxml/xpath.h': No such file or directory
在搭建scrapy爬虫框架时,通过pip安装lxml遇到了这个问题,我是用32位的windows搭建爬虫框架,python版本是2.7.12, 解决方案如下:
原因:
在网上各种找原因,有大神是说没安装libxml2-devel and libxslt-devel,和没有安装 libxml2和 libxslt文件。其实报错原因中也说明了没有安装好 libxml2
各种解决方案,但是找了很久,试了很多种方法,最终我就参考了
http://coding.derkeiler.com/Archive/Python/comp.lang.python/2012-11/msg00520.html
http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml(很多python依赖的库资源下载)
http://jingyan.baidu.com/article/cbcede07177b8702f40b4df9.html
在windows操作系统下:
1、安装wheel,在cmd中输入:pip install wheel
2、下载依赖库,可以在http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml中下载
lxml-3.6.4-cp27-cp27m-win32.whl(python2.7版本,适用于windows32位系统)
lxml-3.6.4-cp27-cp27m-win_amd64.whl(python2.7版本,适用于windows64位系统)
然后,把下载好的依赖文件放在python的安装包中,我的是放在F:\python2.7.12中
3、开始安装lxml
pip install F:\python2.7.12\lxml-3.6.4-cp27-cp27m-win32.whl
Cannot open include file: 'libxml/xpath.h': No such file or directory的更多相关文章
- Solve error: Cannot open include file: 'X11/Xlocale.h': No such file or directory
When you use FLTK with VS2010, you may get the error: fatal error C1083: Cannot open include file: ' ...
- grep: /usr/include/php/main/php.h: No such file or directory
异常 grep: /usr/include/php/main/php.h: No such file or directory grep: /usr/include/php/Zend/zend_mod ...
- 编译openwrt时报错:FMCGenericError.h:34:27: fatal error: libxml/parser.h: No such file or directory
解决办法: 更新openwrt的feeds,并重新make menuconfig ./script/feeds update -a ./script/feeds install -a
- 全志TinaLinux编译错误fatal error: unicode/ucnv.h: No such file or directory
今天开始正式干活了 拿到一个全志Tina的板子还有一个SDK压缩包,要求我这周(只剩一天半...)就要把sdk编译通过并且把板子跑起来. 还特别跟我说他们试了下这个sdk编译没法通过,会报错... 竟 ...
- mac安装扩展出现grep: /usr/include/php/main/php.h
在Mac下执行 sudo phpize时提示: grep: /usr/include/php/main/php.h: No such file or directorygrep: /usr/inclu ...
- libxml/HTMLparser.h file
在导入asihttprequest包时出问题导入了libxml2.dylib,但是却提示libxml/HTMLparser.h file not found,那是因为你的开发环境默认的路径无法找到这个 ...
- libxml/HTMLparser.h file not found
在导入asihttprequest包时出问题导入了libxml2.dylib.可是却提示libxml/HTMLparser.h file not found. 这是由于你的开发环境默认的路径无法找到这 ...
- UI进阶 XML解析适配 'libxml/tree.h'file not found 错误解决办法
Xcode 'libxml/tree.h'file not found 错误解决办法
- (转)win7 64 安装mysql-python:_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory
原文地址:http://www.cnblogs.com/fnng/p/4115607.html 作者:虫师 今天想在在win7 64位环境下使用python 操作mysql 在安装MySQL-pyth ...
随机推荐
- 牛客网(string::find()函数回忆一下)
链接:https://www.nowcoder.com/acm/contest/109/B来源:牛客网 给出两个串s和x 定义s中的某一位i为好的位置,当且仅当存在s的子序列 满足y=x且存在j使得i ...
- Nginx代理实现跨域
#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #erro ...
- tomcat 启动报错 解决办法 A child container failed during
控制台报错: Caused by: org.apache.catalina.LifecycleException: A child container failed during start at o ...
- reactor工作模型
- 如何优雅的使用iBatis
1 使用命名空间2 每张表一个sqlmaps文件3 创建resultMap与parameterMap4 常用的sql创建<sql>片段5 尽量遵循ORM原则设计domain对象
- 【bzoj1878】[SDOI2009]HH的项链 树状数组
题目描述 HH有一串由各种漂亮的贝壳组成的项链.HH相信不同的贝壳会带来好运,所以每次散步完后,他都会随意取出一段贝壳,思考它们所表达的含义.HH不断地收集新的贝壳,因此, 他的项链变得越来越长.有一 ...
- poj3375 Network Connection
Description There are \(M\) network interfaces in the wall of aisle of library. And \(N\) computers ...
- vue父组件中修改子组件样式
1. 使用全局样式 <style> /* 全局样式 */ </style> <style scoped> /* 本地样式 */ </style> 2. ...
- 【ZJ选讲·画山】
给出一张纸(N × M),你要在上面画山,但不能画出界(N,M<=100) Like this: 起点为(0,0),终点为(N,0) 给出w种线段画法(x,y),表示用了这种画法后,笔迹末 ...
- 从一段字符串中去除数字的shell方法