1

On osx 10.10.5 Yosemite I've installed libxml2 using brew. The installation went fine. But when I try to use the package with python, the compiler keeps giving me this error: "ImportError: No module named libxml2"

Then I've tried to install it with pip. This went fine also but I still get the error in Python.. Next I used this command: "sudo gem install nokogiri -- --use-system-libraries --with-xml2-include=/usr/include/libxml2 --with-xml2-lib=/usr/lib"

This installation succeeds with '1 gem installed' but in Python is still can't use the xml library libxml2...

What goes wrong?

  • Possible duplicate of [Homebrew install libxml2 with python modules](http://stackoverflow.com/questions/11054972/homebrew-install-libxml2-with-python-modules) – dyeray Dec 26 '15 at 11:02
  • You can try the solution offered to this other question. I don't work on osx, so I don't know if this is common there, but it surprises me you are trying to use tools for Ruby. Wouldn't be easier to use pip? – dyeray Dec 26 '15 at 11:04
  • I tried the solution offered but this gives me a fatal python error at the moment the libxml2 gets imported into python... **"Fatal Python error: PyThreadState_Get: no current thread" – Brutus Wolfson Dec 26 '15 at 11:41

0 Answers0