小编Jef*_*Lee的帖子

无法在我的Mac上安装Scrapy

我目前正在使用Mac OS X 10.11.1 El Capitan.我在我的mac上安装了python 2.7和3.5.我也安装了pip.但是,我总是无法在我的Mac上安装scrapy.

我用了

$sudo pip install scrapy
Run Code Online (Sandbox Code Playgroud)

它总是发现错误.(像这样)

 1 error generated.
Compile failed: command 'cc' failed with exit status 1
creating tmp
cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInitOS_E4M.c -o tmp/xmlXPathInitOS_E4M.o
/tmp/xmlXPathInitOS_E4M.c:1:10: fatal error: 'libxml/xpath.h' file not found
#include "libxml/xpath.h"
         ^
1 error generated.
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
Perhaps try: xcode-select --install
*********************************************************************************
error: command 'cc' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)

还有这个..

Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-veAN2s/lxml/setup.py';exec(compile(getattr(tokenize, 'open', …
Run Code Online (Sandbox Code Playgroud)

python macos pip scrapy

1
推荐指数
1
解决办法
2368
查看次数

标签 统计

macos ×1

pip ×1

python ×1

scrapy ×1