mac os用pip安装scrapy时报错#include "libxml/xmlversion.h" file not found
来源:互联网 发布:七周年荣耀赛车数据 编辑:程序博客网 时间:2024/06/05 20:55
安装一个python爬虫框架scrapy,pip安装时总是报如下错误:
lxml/src/lxml/includes/etree_defs.h:14:10: fatal error: 'libxml/xmlversion.h' file not found
#include "libxml/xmlversion.h"
^
1 error generated.
error: command 'cc' failed with exit status 1
试了几次仍然不行,用作为'libxml/xmlversion.h' file not found关键词搜索
很快就找到来答案,记录一下。
C_INCLUDE_PATH要指定到XCode MacOSX SDK中libxml路径,一开始只看到:
C_INCLUDE_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include后来发现还要打上sudo和pip install才行
sudo C_INCLUDE_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2/libxml:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include pip install scrapy
1 0
- mac os用pip安装scrapy时报错#include "libxml/xmlversion.h" file not found
- MAC OSX下用pip安装lxml时遇到xmlversion.h not found的解决办法
- MAC OSX下用pip安装lxml时遇到xmlversion.h not found的解决办法
- python安装软件出现错误 fatal error: 'libxml/xmlversion.h' file not found
- The way to fix error: Lexical or Preprocessor Issue 'libxml/xmlversion.h' file not found
- libxml/HTMLparser.h file not found
- 'libxml/tree.h' file not found
- libxml/HTMLparser.h file not found 解决方法
- libxml/HTMLparser.h file not found
- libxml/tree.h file not found
- 'libxml/tree.h' file not found
- libxml/tree.h file not found
- libxml/HTMLparser.h file not found
- 关于 libxml/tree.h' file not found
- 'libxml/tree.h' file not found
- 'libxml/tree.h' file not found
- 'libxml/tree.h' file not found
- libxml/tree.h' file not found
- Java面试题集(1-50)
- MYSQL性能查看(命中率,慢查询)
- 《高性能MySQL》读书笔记--索引
- EAX、ECX、EDX、EBX寄存器的作用
- Nodejs的上传模块formidable
- mac os用pip安装scrapy时报错#include "libxml/xmlversion.h" file not found
- MySQL基本概念--索引&索引类型
- 硬件十万个为什么——运放篇(一)如何防止放大电路自激
- git 使用问题及解决方案
- ng-repeat指令
- oracle的nvl函数的用法
- Git 教程
- 利用xib自定义UITableViewCell,xib中的button不能响应点击事件
- ORACLE基本数据类型总结