2015-09-02

lxmlのインストール失敗 fatal error: 'libxml/xmlversion.h' file not found

lxmlをインストールしようとしたら、
fatal error: 'libxml/xmlversion.h' file not found
とかいうエラーになる。python3.4で、MacのOSX10.10。

英語だけど解決には、このページが参考になりそう。http://stackoverflow.com/questions/19548011/cannot-install-lxml-on-mac-os-x-10-9

まずは、ターミナルで、
$ xcode-select --install 
とやってみる。なんかダイアログがでてきて、xcodeをAppStoreからインストールするかどうか聞かれる。xcodeはインストール済みなので、コマンドラインツールだけをインストールするために[インストール]ボタンを押した。

で、再挑戦 $ pip3 install lxml

成功したっぽい
Successfully installed lxml


0 件のコメント: