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

后端 未结 15 2339
礼貌的吻别
礼貌的吻别 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 20:55

    To install with up to date versions of libxml2 and libxslt:

    ARCHFLAGS="-arch i386 -arch x86_64" STATIC_DEPS=true pip install lxml
    

    To install with specific versions of libraries:

    ARCHFLAGS="-arch i386 -arch x86_64" STATIC_DEPS=true LIBXML2_VERSION=2.7.3 LIBXSLT_VERSION=1.1.24 pip install lxml
    

    CentOS 64 bit (a bit off question, but hard won):

    CFLAGS=-fPIC STATIC_DEPS=true pip install lxml
    

    or

    CFLAGS=-fPIC STATIC_DEPS=true LIBXML2_VERSION=2.7.3 LIBXSLT_VERSION=1.1.24 pip install lxml
    

提交回复
热议问题