- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我知道有几个非常相似的主题,但每个主题都有独特的 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/
我有以下xml文件 10.10.0.135::3111 10.10.0.130::3111 10.10.0.129::3111 10.
我已经为 PyPy 创建了一个 virtualenv: virtualenv test -p `which pypy` source test/bin/activate 我安装了以下依赖项: sudo
我正在尝试使用 lxml 的 ElementTree etree 在我的 xml 文档中查找特定标签。标签如下所示: 12 我希望使用 etree.find('text:statedAge
在 python 3.5 项目中,我必须读取一些 xml 文件,因此我决定使用 lxml 库。由于我正在阅读文件,因此根据文档执行此操作的最有效方法是使用 lxml.etree.parse(...)
执行 pip install lxml 或 pip install pyquery 会出现此错误: gcc: error trying to exec 'cc1': execvp: No such f
我正在使用下面的代码获取一个部分的所有 html 内容以保存到数据库 el = doc.get_element_by_id('productDescription') lxml.html.tostri
我想以可区分的方式打印出 etree 的树结构(由 html 文档形成)(意味着两个 etree 应该以不同的方式打印出来)。 我所说的结构是指树的“形状”,基本上是指所有标签,但没有属性,也没有文本
谁能解释为什么第一次调用 root.cssselect() 有效,而第二次失败? from lxml.html import fromstring from lxml import etree htm
我收到此错误“ImportError: No module named lxml”,即使确实安装了 LXML。具体来说,它安装在项目的 python Virtualenv 中。最终我正在研究 Pyth
我在 Windows 32 位上使用 Anaconda v4.2 和 Python 3.5,并想使用 lxml etree。我的 Anaconda 发行版包括 lxml 3.6.4,但我的 IDE(P
我有一个脚本,可以从 URL 列表的 XML 文件中提取一些术语。所有 URL 都可以访问 XML 数据。 它在第一次正确打开、解析和提取时工作正常,但随后在过程中被某些 XML 文件中断并出现此错误
我正在使用 mechanize/cookiejar/lxml 来读取页面,它适用于某些页面但不适用于其他页面。我在其中遇到的错误是标题中的错误。我不能在这里发布页面,因为它们不是 SFW,但是有没有办
这是一个基本的问题,我实际上在文档中找不到它:-/ 如下: img = house_tree.xpath('//img[@id="mainphoto"]')[0] 如何获取 的 HTML标记? 我尝
我只想说,这个问题我已经在Pip is already installed: but I am getting no module named lxml看到了并且已经看到关于以非 root 用户身份安
我通过 pip 安装了 lxml 3.3.5。现在我在运行一些 Django 测试时遇到了问题: Traceback (most recent call last): File "manage.p
我有一个 Django 应用程序,其中包含 Tastypie 提供的 RESTFull 服务。我使用 easy_install 安装 lxml 和 defusedxml,这样我就可以使用 xml 而不
我正在使用 lxml etree 创建 xml 或 REST 调用。我有命名空间的问题,因为如果没有正确制定,我会从服务器收到语法错误。 正如您在以下 2 个示例中所看到的,我应该得到例如 ns1、n
我对导航具有 lxml.etree namespace 的 xml 文档感到有些困惑。 .我已经看到了一些关于这个主题的主题( 1 、 2 )以及 lxml docs但仍然没有想出答案。 xml =
由于各种原因,我试图从lxml.html.fromstring()切换到lxml.html.html5parser.document_fromstring()。两者之间的最大区别是,第一个返回lxml
我需要通过向现有元素添加子元素来修改现有的 xml 文件。我使用 lxml 库。 Eric Idle 999-999-999 555-555-555
我是一名优秀的程序员,十分优秀!