将Libxml2安装到Mac上

efo*_*ng5 5 python macos libxml2

我正在尝试安装"libxml2"和"libxslt"以便在mac上使用scrapy(使用python进行Web抓取).

我有自制软件,我跑了 $ brew install libxml2 libxslt

我收到这条消息 OS X already provides this software and installing another version in parallel can cause all kinds of trouble.

当我尝试安装scrapy时,使用 $ pip install scrapy

我收到此错误:

Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
    Perhaps try: xcode-select --install
Run Code Online (Sandbox Code Playgroud)

当我尝试时, $ xcode-select libxml2 install 我得到一个无效的参数错误.

有什么建议?

wpe*_*rcy 9

你应该跑$ xcode-select --install.这将安装包含libxml2的XCode命令行工具.