python - Fail to install lxml in MacOS 10.8.4 -


i having trouble installing lxml mac os. having following error when building it. error have when using pip install lxml

/private/var/folders/9s/s5hl5w4x7zjdjkdljw9cnsrm0000gn/t/pip-build-khuevu/lxml/src/lxml/includes/etree_defs.h:9:10: fatal error: 'libxml/xmlversion.h' file not found

i have installed libxml2 brew:

brew install libxml2 brew link libxml2 --force 

i'm new mac. in ubuntu, mean libxml2-dev package must installed.

updated: here pip.log:

"~/.pip/pip.log" 124l, 8293c requirement_set.install(install_options, global_options, root=options.root_path) file "/usr/local/cellar/python/2.7.5/frameworks/python.framework/versions/2.7/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 1185, in install requirement.install(install_options, global_options, *args, **kwargs) file "/usr/local/cellar/python/2.7.5/frameworks/python.framework/versions/2.7/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 592, in install cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=false) file "/usr/local/cellar/python/2.7.5/frameworks/python.framework/versions/2.7/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/util.py", line 662, in call_subprocess % (command_desc, proc.returncode, cwd)) installationerror: command /usr/local/cellar/python/2.7.5/frameworks/python.framework/versions/2.7/resources/python.app/contents/macos/python -c "import setuptools;file='/private/var/folders/9s/s5hl5w4x7zjdjkdljw9cnsrm0000gn/t/pip-build-khuevu/lxml/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /var/folders/9s/s5hl5w4x7zjdjkdljw9cnsrm0000gn/t/pip-nsv0it-record/install-record.txt --single-version-externally-managed failed error code 1 in /private/var/folders/9s/s5hl5w4x7zjdjkdljw9cnsrm0000gn/t/pip-build-khuevu/lxml

any idea ? lot

turn out xmlversion.h not included in compilation path though in path. modify c_include_path env fix error me:

c_include_path=/usr/local/cellar/libxml2/2.9.1/include/libxml2:$c_include_path


Comments

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -