How do you install lxml on OS X Leopard without using MacPorts or Fink?

后端 未结 15 2337
礼貌的吻别
礼貌的吻别 2020-11-30 20:23

I\'ve tried this and run in to problems a bunch of times in the past. Does anyone have a recipe for installing lxml on OS X without MacPorts or Fink that definitely works?<

15条回答
  •  猫巷女王i
    2020-11-30 21:06

    I've had excellent luck with Homebrew to install the libxml2 dependency:

    brew install libxml2
    

    Homebrew doesn't seem to have libxslt available, but I've not yet had a need for XSLT. YMMV.

    Once you have the dependency(s), then the usual methods work just fine:

    pip install lxml
    

    or

    easy_install lxml
    

提交回复
热议问题