MAC OSX下用pip无法安装lxml的解决办法
来源:互联网 发布:python 实现卷积 编辑:程序博客网 时间:2024/05/19 02:45
一、问题现象
在安装pyspider时安装到lxml报错
In file included from src/lxml/lxml.etree.c:323: src/lxml/includes/etree_defs.h:14:10: fatal error: 'libxml/xmlversion.h' file not found #include "libxml/xmlversion.h" ^ 1 error generated. Compile failed: command 'clang' failed with exit status 1 cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInitBMovjd.c -o tmp/xmlXPathInitBMovjd.o /tmp/xmlXPathInitBMovjd.c:1:10: fatal error: 'libxml/xpath.h' file not found #include "libxml/xpath.h" ^ 1 error generated.
二、解决之道
使用命令来设置编译的包含头文件
sudo C_INCLUDE_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2/libxml:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MaOSX10.11.sdk/usr/include pip install lxml
0 0
- MAC OSX下用pip无法安装lxml的解决办法
- MAC OSX下用pip无法安装lxml的解决办法
- MAC OSX下用pip安装lxml时遇到xmlversion.h not found的解决办法
- MAC OSX下用pip安装lxml时遇到xmlversion.h not found的解决办法
- Python: Win7下使用 pip install lxml 无法安装lxml
- 解决mac osx下pip安装ipython权限的问题
- 解决mac osx下pip安装ipython权限的问题
- 解决mac osx下pip安装ipython权限的问题
- 解决mac osx下pip安装ipython权限的问题
- Python包管理pip工具在Mac OSX10.10上的安装及lxml安装错误的解决办法
- mac下安装lxml
- 解决mac osx下pip安装python模块权限的问题
- Mac环境安装 pip lxml requests
- mac下pip的安装
- Windows下使用pip安装lxml
- windows环境下pip安装lxml失败
- mac下安装python-lxml
- Scrapy 在Mac OSX 10.10 上安装错误的解决。Failed building wheel for lxml
- 多线程操作同一个变量
- Multiple-instance learning 和 Multi-label classification
- perl与json
- google 指定网站,关键字大小写结果竟然完全不同
- hibernate search 相关网址
- MAC OSX下用pip无法安装lxml的解决办法
- C++ 类模板和模板类
- socket错误代码对照
- 搭建阿里云OSS python SDK 开发环境
- Python---dict
- Python脚本基础
- c/c++里的 堆区 栈区 静态区 文字常量区 程序代码区(二)
- hbase 命令操作
- ARC