gpt4 book ai didi

python - pip install lxml 在 clang 上提示

转载 作者:太空宇宙 更新时间:2023-11-03 10:49:30 27 4
gpt4 key购买 nike

我知道有几个非常相似的主题,但每个主题都有独特的 clang 回溯,我的情况也不异常(exception)。

我的 macOS 版本是 Mojave 10.14.2。我安装了命令行工具,$ echo $C_INCLUDE_PATH 输出 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/包括

所以我正在尝试通过 pip install lxml 安装 lxml,并获得以下回溯:

Running setup.py bdist_wheel for lxml ... error
Complete output from command /Users/bulrathi/Virtualenvs/gm-test/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/4n/brsfjpqx0kz8lh4rdcz6nb0w0000gn/T/pip-install-8a1v9j7p/lxml/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/4n/brsfjpqx0kz8lh4rdcz6nb0w0000gn/T/pip-wheel-wpeizpmd --python-tag cp37:
Building lxml version 3.6.0.
Building without Cython.
Using build configuration of libxslt 1.1.29
Building against libxml2/libxslt in the following directory: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.14-x86_64-3.7
creating build/lib.macosx-10.14-x86_64-3.7/lxml
copying src/lxml/_elementpath.py -> build/lib.macosx-10.14-x86_64-3.7/lxml
copying src/lxml/sax.py -> build/lib.macosx-10.14-x86_64-3.7/lxml
copying src/lxml/pyclasslookup.py -> build/lib.macosx-10.14-x86_64-3.7/lxml
copying src/lxml/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/lxml
copying src/lxml/builder.py -> build/lib.macosx-10.14-x86_64-3.7/lxml
copying src/lxml/doctestcompare.py -> build/lib.macosx-10.14-x86_64-3.7/lxml
copying src/lxml/usedoctest.py -> build/lib.macosx-10.14-x86_64-3.7/lxml
copying src/lxml/cssselect.py -> build/lib.macosx-10.14-x86_64-3.7/lxml
copying src/lxml/ElementInclude.py -> build/lib.macosx-10.14-x86_64-3.7/lxml
creating build/lib.macosx-10.14-x86_64-3.7/lxml/includes
copying src/lxml/includes/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/lxml/includes
creating build/lib.macosx-10.14-x86_64-3.7/lxml/html
copying src/lxml/html/soupparser.py -> build/lib.macosx-10.14-x86_64-3.7/lxml/html
copying src/lxml/html/defs.py -> build/lib.macosx-10.14-x86_64-3.7/lxml/html
copying src/lxml/html/_setmixin.py -> build/lib.macosx-10.14-x86_64-3.7/lxml/html
copying src/lxml/html/clean.py -> build/lib.macosx-10.14-x86_64-3.7/lxml/html
copying src/lxml/html/_diffcommand.py -> build/lib.macosx-10.14-x86_64-3.7/lxml/html
copying src/lxml/html/html5parser.py -> build/lib.macosx-10.14-x86_64-3.7/lxml/html
copying src/lxml/html/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/lxml/html
copying src/lxml/html/formfill.py -> build/lib.macosx-10.14-x86_64-3.7/lxml/html
copying src/lxml/html/builder.py -> build/lib.macosx-10.14-x86_64-3.7/lxml/html
copying src/lxml/html/ElementSoup.py -> build/lib.macosx-10.14-x86_64-3.7/lxml/html
copying src/lxml/html/_html5builder.py -> build/lib.macosx-10.14-x86_64-3.7/lxml/html
copying src/lxml/html/usedoctest.py -> build/lib.macosx-10.14-x86_64-3.7/lxml/html
copying src/lxml/html/diff.py -> build/lib.macosx-10.14-x86_64-3.7/lxml/html
creating build/lib.macosx-10.14-x86_64-3.7/lxml/isoschematron
copying src/lxml/isoschematron/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/lxml/isoschematron
copying src/lxml/lxml.etree.h -> build/lib.macosx-10.14-x86_64-3.7/lxml
copying src/lxml/lxml.etree_api.h -> build/lib.macosx-10.14-x86_64-3.7/lxml
copying src/lxml/includes/xmlerror.pxd -> build/lib.macosx-10.14-x86_64-3.7/lxml/includes
copying src/lxml/includes/c14n.pxd -> build/lib.macosx-10.14-x86_64-3.7/lxml/includes
copying src/lxml/includes/xmlschema.pxd -> build/lib.macosx-10.14-x86_64-3.7/lxml/includes
copying src/lxml/includes/schematron.pxd -> build/lib.macosx-10.14-x86_64-3.7/lxml/includes
copying src/lxml/includes/tree.pxd -> build/lib.macosx-10.14-x86_64-3.7/lxml/includes
copying src/lxml/includes/uri.pxd -> build/lib.macosx-10.14-x86_64-3.7/lxml/includes
copying src/lxml/includes/etreepublic.pxd -> build/lib.macosx-10.14-x86_64-3.7/lxml/includes
copying src/lxml/includes/xpath.pxd -> build/lib.macosx-10.14-x86_64-3.7/lxml/includes
copying src/lxml/includes/htmlparser.pxd -> build/lib.macosx-10.14-x86_64-3.7/lxml/includes
copying src/lxml/includes/xslt.pxd -> build/lib.macosx-10.14-x86_64-3.7/lxml/includes
copying src/lxml/includes/config.pxd -> build/lib.macosx-10.14-x86_64-3.7/lxml/includes
copying src/lxml/includes/xmlparser.pxd -> build/lib.macosx-10.14-x86_64-3.7/lxml/includes
copying src/lxml/includes/xinclude.pxd -> build/lib.macosx-10.14-x86_64-3.7/lxml/includes
copying src/lxml/includes/dtdvalid.pxd -> build/lib.macosx-10.14-x86_64-3.7/lxml/includes
copying src/lxml/includes/relaxng.pxd -> build/lib.macosx-10.14-x86_64-3.7/lxml/includes
copying src/lxml/includes/lxml-version.h -> build/lib.macosx-10.14-x86_64-3.7/lxml/includes
copying src/lxml/includes/etree_defs.h -> build/lib.macosx-10.14-x86_64-3.7/lxml/includes
creating build/lib.macosx-10.14-x86_64-3.7/lxml/isoschematron/resources
creating build/lib.macosx-10.14-x86_64-3.7/lxml/isoschematron/resources/rng
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.macosx-10.14-x86_64-3.7/lxml/isoschematron/resources/rng
creating build/lib.macosx-10.14-x86_64-3.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.macosx-10.14-x86_64-3.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.macosx-10.14-x86_64-3.7/lxml/isoschematron/resources/xsl
creating build/lib.macosx-10.14-x86_64-3.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.macosx-10.14-x86_64-3.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.macosx-10.14-x86_64-3.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.macosx-10.14-x86_64-3.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.macosx-10.14-x86_64-3.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.macosx-10.14-x86_64-3.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.macosx-10.14-x86_64-3.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
creating build/temp.macosx-10.14-x86_64-3.7
creating build/temp.macosx-10.14-x86_64-3.7/src
creating build/temp.macosx-10.14-x86_64-3.7/src/lxml
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/libxml2 -Isrc/lxml/includes -I/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/lxml/lxml.etree.c -o build/temp.macosx-10.14-x86_64-3.7/src/lxml/lxml.etree.o -w -flat_namespace
src/lxml/lxml.etree.c:220873:21: error: no member named 'exc_type' in 'struct _ts'
*type = tstate->exc_type;
~~~~~~ ^
src/lxml/lxml.etree.c:220874:22: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
*value = tstate->exc_value;
^~~~~~~~~
curexc_value
/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
PyObject *curexc_value;
^
src/lxml/lxml.etree.c:220875:19: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
*tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
PyObject *curexc_traceback;
^
src/lxml/lxml.etree.c:220887:24: error: no member named 'exc_type' in 'struct _ts'
tmp_type = tstate->exc_type;
~~~~~~ ^
src/lxml/lxml.etree.c:220888:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
tmp_value = tstate->exc_value;
^~~~~~~~~
curexc_value
/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
PyObject *curexc_value;
^
src/lxml/lxml.etree.c:220889:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
tmp_tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
PyObject *curexc_traceback;
^
src/lxml/lxml.etree.c:220890:13: error: no member named 'exc_type' in 'struct _ts'
tstate->exc_type = type;
~~~~~~ ^
src/lxml/lxml.etree.c:220891:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
tstate->exc_value = value;
^~~~~~~~~
curexc_value
/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
PyObject *curexc_value;
^
src/lxml/lxml.etree.c:220892:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
tstate->exc_traceback = tb;
^~~~~~~~~~~~~
curexc_traceback
/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
PyObject *curexc_traceback;
^
src/lxml/lxml.etree.c:220935:24: error: no member named 'exc_type' in 'struct _ts'
tmp_type = tstate->exc_type;
~~~~~~ ^
src/lxml/lxml.etree.c:220936:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
tmp_value = tstate->exc_value;
^~~~~~~~~
curexc_value
/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
PyObject *curexc_value;
^
src/lxml/lxml.etree.c:220937:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
tmp_tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
PyObject *curexc_traceback;
^
src/lxml/lxml.etree.c:220938:13: error: no member named 'exc_type' in 'struct _ts'
tstate->exc_type = local_type;
~~~~~~ ^
src/lxml/lxml.etree.c:220939:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
tstate->exc_value = local_value;
^~~~~~~~~
curexc_value
/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
PyObject *curexc_value;
^
src/lxml/lxml.etree.c:220940:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
tstate->exc_traceback = local_tb;
^~~~~~~~~~~~~
curexc_traceback
/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
PyObject *curexc_traceback;
^
src/lxml/lxml.etree.c:221249:24: error: no member named 'exc_type' in 'struct _ts'
tmp_type = tstate->exc_type;
~~~~~~ ^
src/lxml/lxml.etree.c:221250:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
tmp_value = tstate->exc_value;
^~~~~~~~~
curexc_value
/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
PyObject *curexc_value;
^
src/lxml/lxml.etree.c:221251:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
tmp_tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
PyObject *curexc_traceback;
^
src/lxml/lxml.etree.c:221252:13: error: no member named 'exc_type' in 'struct _ts'
tstate->exc_type = *type;
~~~~~~ ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
Compile failed: command 'clang' failed with exit status 1
creating var
creating var/folders
creating var/folders/4n
creating var/folders/4n/brsfjpqx0kz8lh4rdcz6nb0w0000gn
creating var/folders/4n/brsfjpqx0kz8lh4rdcz6nb0w0000gn/T
cc -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/libxml2 -I/usr/include/libxml2 -c /var/folders/4n/brsfjpqx0kz8lh4rdcz6nb0w0000gn/T/xmlXPathIniti_lemcx7.c -o var/folders/4n/brsfjpqx0kz8lh4rdcz6nb0w0000gn/T/xmlXPathIniti_lemcx7.o
/var/folders/4n/brsfjpqx0kz8lh4rdcz6nb0w0000gn/T/xmlXPathIniti_lemcx7.c:2:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
main (int argc, char **argv) {
^
1 warning generated.
cc var/folders/4n/brsfjpqx0kz8lh4rdcz6nb0w0000gn/T/xmlXPathIniti_lemcx7.o -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib -lxml2 -o a.out
error: command 'clang' failed with exit status 1

----------------------------------------
Failed building wheel for lxml

Command "/Users/bulrathi/Virtualenvs/gm-test/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/4n/brsfjpqx0kz8lh4rdcz6nb0w0000gn/T/pip-install-0tja2284/lxml/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/4n/brsfjpqx0kz8lh4rdcz6nb0w0000gn/T/pip-record-w1eydfb_/install-record.txt --single-version-externally-managed --compile --install-headers /Users/bulrathi/Virtualenvs/gm-test/bin/../include/site/python3.7/lxml" failed with error code 1 in /private/var/folders/4n/brsfjpqx0kz8lh4rdcz6nb0w0000gn/T/pip-install-0tja2284/lxml/

你能帮忙吗?

最佳答案

问题是我试图从我的系统上有 python3.7.0 的 requirements.txt 安装 lxml==3.6.0。 lxml3.6.0与python3.7.0不兼容,请考虑使用lxml>4.0。谢谢@hoefling!

关于python - pip install lxml 在 clang 上提示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53804251/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com