0

I've already read the questions here, here and here. Basically, I'm using a conda environment and I want to install lxml. When I run pip install lxml I get a long error message that includes Failed building wheel for lxml and error minimum required version of libxslt is 1.1.23. This makes me believe I need to install libxml2 and libxslt into the virtual environment (they are already installed on the system outside the environment.)

So for Linux, I read in one of the linked answers that I should run:

apt-get install libxml2-dev libxslt-dev

I tried to adapt that to OSX and homebrew. Inside the conda environment I ran:

brew install libxml2-dev libxslt-dev

and got:

Error: No available formula with the name "libxml2-dev"

How do I get homebrew to install libxml2 into the conda environment?

Community
  • 1
  • 1
Jason
  • 884
  • 8
  • 28
  • Possible duplicate of [How to install libxml2-dev libxslt-dev on Mac os](http://stackoverflow.com/questions/26473197/how-to-install-libxml2-dev-libxslt-dev-on-mac-os) – Selcuk May 15 '16 at 03:29
  • I don't think it's a duplicate. That solution didn't work for me (got the same error as above `minimum required version of libxslt is 1.1.23`). – Jason May 15 '16 at 03:57
  • Depending on the distro it can sometimes be `libxml2-devel libxslt-devel`... – l'L'l May 15 '16 at 05:29
  • brew does not distinguish between runtime and development packages usually. When you install `libxml2` it will install the runtime libs as well as the headers to link to it as well. You will just have to make sure your application links to this library then instead of the system default one (which seems to be too old for your use). – Florian Zwoch May 15 '16 at 08:53

1 Answers1

0

I feel foolish. I ran

conda install lxml

and that worked. I had been thinking only about using pip.

If you are reading this and want to use pip and brew instead of conda, I believe you might need to create a symlink to the correct keg-only installation of libxml2 and libxslt.

Jason
  • 884
  • 8
  • 28