mac os用pip安装scrapy时报错#include "libxml/xmlversion.h" file not found
2015-08-12 15:02
537 查看
安装一个python爬虫框架scrapy,pip安装时总是报如下错误:
试了几次仍然不行,用作为'libxml/xmlversion.h'
file not found关键词搜索
很快就找到来答案,记录一下。
C_INCLUDE_PATH要指定到XCode MacOSX SDK中libxml路径,一开始只看到:
后来发现还要打上sudo和pip install才行
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
相关文章推荐
- springMVC学习笔记---参数传递
- Ajax(1)简介
- 根据文本内容确定UILabel的高度
- ng-switch指令
- bootstrap 三种提示框 (tooltip工具提示+popover弹出框+alert警告框)
- hdoj还是畅通工程
- 基于RF芯片nRF401、AT89C52微控制器和MAX3316接口芯片的无线数传模块设计
- UI025---静态单元格的使用
- 最新版 使用Xcode6.4 和Instruments、Leaks调试解决iOS内存泄露
- hdu 2066 一个人的旅行
- hdu5373 The shortest problem(迭代模拟+同余定理)
- android-----提交数据到服务器的4中方式
- html5验证+点击button刷新页面+uncaught exception: out of memory
- Android 5.0 SDK 下载地址
- Bitmap基本概念及在Android4.4系统上使用BitmapFactory的注意事项
- 玉器网店banner小设计
- http://lamp.phpstudy.net/
- kali linux 2.0 正式发布
- 关于Android的问号?和@符号的用法
- 屏蔽ERP画面中的工具栏