0
votes

On Mac OS 10.14.6, I'm trying to install lxml for Python 3.6 with:

> STATIC_DEPS=true easy_install-3.6 lxml

I get this exception:

Exception: Command "./configure --prefix=/private/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/build/tmp/libxml2" returned code 1

Here's the entire trace I get:

Searching for lxml Reading https://pypi.python.org/simple/lxml/ Downloading https://files.pythonhosted.org/packages/03/a8/73d795778143be51d8b86750b371b3efcd7139987f71618ad9f4b8b65543/lxml-4.5.1.tar.gz#sha256=27ee0faf8077c7c1a589573b1450743011117f1aa1a91d5ae776bbc5ca6070f2

Best match: lxml 4.5.1 Processing lxml-4.5.1.tar.gz Writing /var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/setup.cfg Running lxml-4.5.1/setup.py -q bdist_egg --dist-dir /var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/egg-dist-tmp-mnc4h10m Building lxml version 4.5.1. Latest version of zlib is 1.2.11 Downloading zlib into libs/zlib-1.2.11.tar.gz from https://zlib.net/zlib-1.2.11.tar.gz Unpacking zlib-1.2.11.tar.gz into build/tmp Latest version of libiconv is 1.16 Downloading libiconv into libs/libiconv-1.16.tar.gz from https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz Unpacking libiconv-1.16.tar.gz into build/tmp Latest version of libxml2 is 2.9.10 Downloading libxml2 into libs/libxml2-2.9.10.tar.gz from http://xmlsoft.org/sources/libxml2-2.9.10.tar.gz Unpacking libxml2-2.9.10.tar.gz into build/tmp Latest version of libxslt is 1.1.34 Downloading libxslt into libs/libxslt-1.1.34.tar.gz from http://xmlsoft.org/sources/libxslt-1.1.34.tar.gz Unpacking libxslt-1.1.34.tar.gz into build/tmp Starting build in build/tmp/zlib-1.2.11 Checking for gcc... Compiler error reporting is too harsh for ./configure (perhaps remove -Werror). ** ./configure aborting. Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py", line 157, in save_modules yield saved File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py", line 198, in setup_context yield File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py", line 248, in run_setup DirectorySandbox(setup_dir).run(runner) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py", line 278, in run return func() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py", line 246, in runner _execfile(setup_script, ns) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py", line 47, in _execfile exec(code, globals, locals) File "/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/setup.py", line 245, in File "/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/setup.py", line 153, in setup_extra_options File "/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/setupinfo.py", line 82, in ext_modules File "/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/buildlibxml.py", line 391, in build_libxml2xslt File "/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/buildlibxml.py", line 330, in cmmi File "/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/buildlibxml.py", line 320, in call_subprocess Exception: Command "./configure --prefix=/private/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/build/tmp/libxml2" returned code 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/bin/easy_install-3.6", line 11, in sys.exit(main()) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 2265, in main **kw File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 410, in run self.easy_install(spec, not self.no_deps) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 665, in easy_install return self.install_item(spec, dist.location, tmpdir, deps) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 695, in install_item dists = self.install_eggs(spec, download, tmpdir) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 876, in install_eggs return self.build_and_install(setup_script, setup_base) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 1115, in build_and_install self.run_setup(setup_script, setup_base, args) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 1101, in run_setup run_setup(setup_script, args) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py", line 251, in run_setup raise File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/contextlib.py", line 99, in exit self.gen.throw(type, value, traceback) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py", line 198, in setup_context yield File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/contextlib.py", line 99, in exit self.gen.throw(type, value, traceback) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py", line 169, in save_modules saved_exc.resume() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py", line 144, in resume six.reraise(type, exc, self._tb) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkg_resources/_vendor/six.py", line 685, in reraise raise value.with_traceback(tb) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py", line 157, in save_modules yield saved File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py", line 198, in setup_context yield File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py", line 248, in run_setup DirectorySandbox(setup_dir).run(runner) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py", line 278, in run return func() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py", line 246, in runner _execfile(setup_script, ns) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py", line 47, in _execfile exec(code, globals, locals) File "/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/setup.py", line 245, in File "/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/setup.py", line 153, in setup_extra_options File "/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/setupinfo.py", line 82, in ext_modules File "/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/buildlibxml.py", line 391, in build_libxml2xslt File "/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/buildlibxml.py", line 330, in cmmi File "/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/buildlibxml.py", line 320, in call_subprocess Exception: Command "./configure --prefix=/private/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/build/tmp/libxml2" returned code 1

any help will appreciate! tanks

1

1 Answers

0
votes

Depending on your setup, you might install lxml with one of these commands:

$ apt-get install python-lxml

$ easy_install lxml

$ pip install lxml