#python #lxml
Вопрос:
Я попытался установить lxml в Mac OS Big Sur на Python3.10
STATIC_DEPS=true pip установить lxml
Я сталкиваюсь с подобным исключением.
checking for xml2-config... /private/var/folders/nx/wht1m14j79x7r04skmdjgf240000gs/T/pip-install-dhkyd4bj/lxml_f16a70f12b4b4ce3b165daedb379101f/build/tmp/libxml2/bin/xml2-config
configure: error: Could not find libxml2 anywhere, check ftp://xmlsoft.org/.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/nx/wht1m14j79x7r04skmdjgf240000gs/T/pip-install-dhkyd4bj/lxml_f16a70f12b4b4ce3b165daedb379101f/setup.py", line 246, in <module>
**setup_extra_options()
^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/nx/wht1m14j79x7r04skmdjgf240000gs/T/pip-install-dhkyd4bj/lxml_f16a70f12b4b4ce3b165daedb379101f/setup.py", line 151, in setup_extra_options
ext_modules = setupinfo.ext_modules(
^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/nx/wht1m14j79x7r04skmdjgf240000gs/T/pip-install-dhkyd4bj/lxml_f16a70f12b4b4ce3b165daedb379101f/setupinfo.py", line 74, in ext_modules
XML2_CONFIG, XSLT_CONFIG = build_libxml2xslt(
^^^^^^^^^^^^^^^^^^
File "/private/var/folders/nx/wht1m14j79x7r04skmdjgf240000gs/T/pip-install-dhkyd4bj/lxml_f16a70f12b4b4ce3b165daedb379101f/buildlibxml.py", line 447, in build_libxml2xslt
cmmi(libxslt_configure_cmd, libxslt_dir, multicore, **call_setup)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/nx/wht1m14j79x7r04skmdjgf240000gs/T/pip-install-dhkyd4bj/lxml_f16a70f12b4b4ce3b165daedb379101f/buildlibxml.py", line 330, in cmmi
call_subprocess(configure_cmd, cwd=build_dir, **call_setup)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/nx/wht1m14j79x7r04skmdjgf240000gs/T/pip-install-dhkyd4bj/lxml_f16a70f12b4b4ce3b165daedb379101f/buildlibxml.py", line 320, in call_subprocess
raise Exception('Command "%s" returned code %s' % (cmd_desc, returncode))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Exception: Command "./configure --disable-dependency-tracking --disable-shared --prefix=/private/var/folders/nx/wht1m14j79x7r04skmdjgf240000gs/T/pip-install-dhkyd4bj/lxml_f16a70f12b4b4ce3b165daedb379101f/build/tmp/libxml2 --without-python --with-libxml-prefix=/private/var/folders/nx/wht1m14j79x7r04skmdjgf240000gs/T/pip-install-dhkyd4bj/lxml_f16a70f12b4b4ce3b165daedb379101f/build/tmp/libxml2 --without-crypto" returned code 1
Building lxml version 4.6.3.
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.12
Downloading libxml2 into libs/libxml2-2.9.12.tar.gz from http://xmlsoft.org/sources/libxml2-2.9.12.tar.gz
Unpacking libxml2-2.9.12.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
Starting build in build/tmp/libiconv-1.16
Starting build in build/tmp/libxml2-2.9.12
Starting build in build/tmp/libxslt-1.1.34
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/e5/21/a2e4517e3d216f0051687eea3d3317557bde68736f038a3b105ac3809247/lxml-4.6.3.tar.gz#sha256=39b78571b3b30645ac77b95f7c69d1bffc4cf8c3b157c435a34da72e78c82468 (from https://pypi.org/simple/lxml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4.*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Пожалуйста, предложите предложения по устранению неполадок.
Я пробовал без STATIC_DEPS=true
и столкнулся с той же проблемой.