0

Every time I am trying to install lxml package I am getting the below error in the end..

llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-
aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/usr/include/libxml2 -I/private/var/folders/43/m1qv9zf53q19sqh6h9kg9pz80000gn/T/pip_build_sanjeevkumar/lxml/src/lxml/includes -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.7-intel-2.7/src/lxml/lxml.etree.o -flat_namespace

unable to execute llvm-gcc-4.2: No such file or directory

error: command 'llvm-gcc-4.2' failed with exit status 1
Ciasto piekarz
  • 7,853
  • 18
  • 101
  • 197
  • This is arguably a bug in the lxml build scripts. Assuming/relying on `llvm-gcc-4.2` has not been a good idea on OS X for a while. – millimoose Jan 05 '14 at 05:39
  • well that doesn't sound good, I cloned howdoi package from github which seems to rely on lxml , and I am getting error `ImportError: No module named lxml` – Ciasto piekarz Jan 05 '14 at 05:44
  • For what it's worth `pip install lxml` seems to work for me, warnings notwithstanding. As does `import lxml` afterwards. How exactly are you installing lxml and is it the current version? And why are you even installing the dependency manually instead of just using `pip install howdoi` or `easy_install howdoi`? – millimoose Jan 05 '14 at 06:02
  • Also, `brew install https://raw.github.com/gleitz/howdoi/master/howdoi.rb` should also work, although it will add all those libraries into whatever your current Python installation is which I'm not a fan of. – millimoose Jan 05 '14 at 06:08
  • I do not have `brew` installed !! – Ciasto piekarz Jan 05 '14 at 11:04
  • Shouldn't really matter. `virtualenv -p /usr/bin/python; howdoi/bin/pip install howdoi` *should* work. (E.g. install howdoi into a new, clean virtual environment based on the OS X provided Python - meaning without me having had anything else preinstalled.) I say "should" because PyPI is down right now and I can't test. – millimoose Jan 05 '14 at 16:13

1 Answers1

0

Install Xcode first from the App Store. LLVM compiler is integrated in Xcode. Strap in for a big download.

fmalina
  • 6,120
  • 4
  • 37
  • 47