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

后端 未结 15 2336
礼貌的吻别
礼貌的吻别 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条回答
  •  执念已碎
    2020-11-30 21:11

    This worked for me on 10.8.5

    1. Install Xcode from Mac App Store
    2. Xcode -> Preferences -> Downloads -> Command Line Tools
    3. Install homebrew using
    4. ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
    5. brew install libxml2
    6. sudo easy_install lxml

    This comprises suggestions from:

    • https://stackoverflow.com/a/6545556/300224
    • https://stackoverflow.com/a/5785013/300224
    • https://stackoverflow.com/a/9403589

    But I wanted to compile it into one answer rather than leave comments everywhere

提交回复
热议问题