Mac 上的 lxml 安装问题

发布于 2024-11-27 04:43:18 字数 8396 浏览 0 评论 0原文

我正在尝试在本地 Mac 上安装 Collective.xdv。我按照此处的说明进行操作:http://plone。 org/products/collective.xdv/documentation/tutorial/advanced-xdv-theming/preventions

我的网站仅在我删除所有对 Collective.xdv 的引用时才有效构建.cfg。如果我包含对 Collective.xdv 的引用,那么我的网站不会加载,并且我的日志文件显示:错误应用程序无法安装五个(我见过在线论坛,人们在安装其他产品时收到此错误消息。我已经尝试过建议修复,但它们对我不起作用。)

编辑:“应用程序无法安装五个”错误似乎是一种通用错误,因此回溯中最可能重要的部分是:导入错误: dlopen(/Applications/Plone/buildout-cache/eggs/lxml-2.2.4-py2.6-macosx-10.4-i386.egg/lxml/etree.so, 2):找不到合适的图像。是否发现: /Applications/Plone/buildout-cache/eggs/lxml-2.2.4-py2.6-macosx-10.4-i386.egg/lxml/etree.so:mach-o,但架构错误

    2011-07-29T13:44:57 ERROR Application Couldn't install Five
    Traceback (most recent call last):
      File "/Applications/Plone/buildout-cache/eggs/Zope2-2.12.11-py2.6-macosx-10.4-i386.egg/OFS/Application.py", line 671, in install_product
        initmethod(context)
      File "/Applications/Plone/buildout-cache/eggs/Zope2-2.12.11-py2.6-macosx-10.4-i386.egg/Products/Five/__init__.py", line 31, in initialize
        zcml.load_site()
      File "/Applications/Plone/buildout-cache/eggs/Zope2-2.12.11-py2.6-macosx-10.4-i386.egg/Products/Five/zcml.py", line 51, in load_site
        _context = xmlconfig.file(file)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 647, in file
        include(context, name, package)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 546, in include
        processxmlfile(f, context)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 378, in processxmlfile
        parser.parse(src)
      File "/Applications/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
        xmlreader.IncrementalParser.parse(self, source)
      File "/Applications/Plone/Python-2.6/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
        self.feed(buffer)
      File "/Applications/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
        self._parser.Parse(data, isFinal)
      File "/Applications/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py", line 349, in end_element_ns
        self._cont_handler.endElementNS(pair, None)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 357, in endElementNS
        self.context.end()
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 537, in end
        self.stack.pop().finish()
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 685, in finish
        actions = self.handler(context, **args)
      File "/Applications/Plone/buildout-cache/eggs/Zope2-2.12.11-py2.6-macosx-10.4-i386.egg/Products/Five/fiveconfigure.py", line 74, in loadProducts
        handleBrokenProduct(product)
      File "/Applications/Plone/buildout-cache/eggs/Zope2-2.12.11-py2.6-macosx-10.4-i386.egg/Products/Five/fiveconfigure.py", line 72, in loadProducts
        xmlconfig.include(_context, zcml, package=product)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 546, in include
        processxmlfile(f, context)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 378, in processxmlfile
        parser.parse(src)
      File "/Applications/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
        xmlreader.IncrementalParser.parse(self, source)
      File "/Applications/Plone/Python-2.6/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
        self.feed(buffer)
      File "/Applications/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
        self._parser.Parse(data, isFinal)
      File "/Applications/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py", line 349, in end_element_ns
        self._cont_handler.endElementNS(pair, None)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 357, in endElementNS
        self.context.end()
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 537, in end
        self.stack.pop().finish()
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 685, in finish
        actions = self.handler(context, **args)
      File "/Applications/Plone/buildout-cache/eggs/z3c.autoinclude-0.3.2-py2.6.egg/z3c/autoinclude/zcml.py", line 104, in includePluginsDirective
        includeZCMLGroup(_context, info, filename)
      File "/Applications/Plone/buildout-cache/eggs/z3c.autoinclude-0.3.2-py2.6.egg/z3c/autoinclude/zcml.py", line 30, in includeZCMLGroup
        include(_context, filename, includable_package)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 546, in include
        processxmlfile(f, context)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 378, in processxmlfile
        parser.parse(src)
      File "/Applications/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
        xmlreader.IncrementalParser.parse(self, source)
      File "/Applications/Plone/Python-2.6/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
        self.feed(buffer)
      File "/Applications/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
        self._parser.Parse(data, isFinal)
      File "/Applications/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py", line 349, in end_element_ns
        self._cont_handler.endElementNS(pair, None)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 357, in endElementNS
        self.context.end()
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 537, in end
        self.stack.pop().finish()
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 684, in finish
        args = toargs(context, *self.argdata)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 1376, in toargs
        args[str(name)] = field.fromUnicode(s)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/fields.py", line 229, in fromUnicode
        v = vt.fromUnicode(s)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/fields.py", line 139, in fromUnicode
        value = self.context.resolve(name)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 180, in resolve
        mod = __import__(mname, *_import_chickens)
      File "/Applications/Plone/buildout-cache/eggs/collective.xdv-1.0rc11-py2.6.egg/collective/xdv/transform.py", line 4, in <module>
        from lxml import etree
    ZopeXMLConfigurationError: File "/Applications/Plone/zinstance/parts/instance/etc/site.zcml", line 16.2-16.23
        ZopeXMLConfigurationError: File "/Applications/Plone/buildout-cache/eggs/Plone-4.0.1-py2.6.egg/Products/CMFPlone/configure.zcml", line 94.4-98.10
        ZopeXMLConfigurationError: File "/Applications/Plone/buildout-cache/eggs/collective.xdv-1.0rc11-py2.6.egg/collective/xdv/configure.zcml", line 25.4-28.10
        ImportError: dlopen(/Applications/Plone/buildout-cache/eggs/lxml-2.2.4-py2.6-macosx-10.4-i386.egg/lxml/etree.so, 2): no suitable image found.  Did find:
        /Applications/Plone/buildout-cache/eggs/lxml-2.2.4-py2.6-macosx-10.4-i386.egg/lxml/etree.so: mach-o, but wrong architecture

I am trying to install collective.xdv on my Mac locally. I am following the instructions here: http://plone.org/products/collective.xdv/documentation/tutorial/advanced-xdv-theming/prerequisites

My site only works when I take out all references to collective.xdv in buildout.cfg. If I include references to collective.xdv then my site doesn't load and my log file says: ERROR Application Couldn't Install Five (I have seen online forums where people are getting this error message when installing other products. I have tried the fixes recommended but they didn't work for me.)

EDIT: the "Application Couldn't install Five" error seems to be a kind of generic one, hence the most likely important part of the traceback is: ImportError: dlopen(/Applications/Plone/buildout-cache/eggs/lxml-2.2.4-py2.6-macosx-10.4-i386.egg/lxml/etree.so, 2): no suitable image found. Did find:
/Applications/Plone/buildout-cache/eggs/lxml-2.2.4-py2.6-macosx-10.4-i386.egg/lxml/etree.so: mach-o, but wrong architecture

    2011-07-29T13:44:57 ERROR Application Couldn't install Five
    Traceback (most recent call last):
      File "/Applications/Plone/buildout-cache/eggs/Zope2-2.12.11-py2.6-macosx-10.4-i386.egg/OFS/Application.py", line 671, in install_product
        initmethod(context)
      File "/Applications/Plone/buildout-cache/eggs/Zope2-2.12.11-py2.6-macosx-10.4-i386.egg/Products/Five/__init__.py", line 31, in initialize
        zcml.load_site()
      File "/Applications/Plone/buildout-cache/eggs/Zope2-2.12.11-py2.6-macosx-10.4-i386.egg/Products/Five/zcml.py", line 51, in load_site
        _context = xmlconfig.file(file)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 647, in file
        include(context, name, package)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 546, in include
        processxmlfile(f, context)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 378, in processxmlfile
        parser.parse(src)
      File "/Applications/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
        xmlreader.IncrementalParser.parse(self, source)
      File "/Applications/Plone/Python-2.6/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
        self.feed(buffer)
      File "/Applications/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
        self._parser.Parse(data, isFinal)
      File "/Applications/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py", line 349, in end_element_ns
        self._cont_handler.endElementNS(pair, None)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 357, in endElementNS
        self.context.end()
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 537, in end
        self.stack.pop().finish()
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 685, in finish
        actions = self.handler(context, **args)
      File "/Applications/Plone/buildout-cache/eggs/Zope2-2.12.11-py2.6-macosx-10.4-i386.egg/Products/Five/fiveconfigure.py", line 74, in loadProducts
        handleBrokenProduct(product)
      File "/Applications/Plone/buildout-cache/eggs/Zope2-2.12.11-py2.6-macosx-10.4-i386.egg/Products/Five/fiveconfigure.py", line 72, in loadProducts
        xmlconfig.include(_context, zcml, package=product)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 546, in include
        processxmlfile(f, context)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 378, in processxmlfile
        parser.parse(src)
      File "/Applications/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
        xmlreader.IncrementalParser.parse(self, source)
      File "/Applications/Plone/Python-2.6/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
        self.feed(buffer)
      File "/Applications/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
        self._parser.Parse(data, isFinal)
      File "/Applications/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py", line 349, in end_element_ns
        self._cont_handler.endElementNS(pair, None)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 357, in endElementNS
        self.context.end()
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 537, in end
        self.stack.pop().finish()
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 685, in finish
        actions = self.handler(context, **args)
      File "/Applications/Plone/buildout-cache/eggs/z3c.autoinclude-0.3.2-py2.6.egg/z3c/autoinclude/zcml.py", line 104, in includePluginsDirective
        includeZCMLGroup(_context, info, filename)
      File "/Applications/Plone/buildout-cache/eggs/z3c.autoinclude-0.3.2-py2.6.egg/z3c/autoinclude/zcml.py", line 30, in includeZCMLGroup
        include(_context, filename, includable_package)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 546, in include
        processxmlfile(f, context)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 378, in processxmlfile
        parser.parse(src)
      File "/Applications/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
        xmlreader.IncrementalParser.parse(self, source)
      File "/Applications/Plone/Python-2.6/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
        self.feed(buffer)
      File "/Applications/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
        self._parser.Parse(data, isFinal)
      File "/Applications/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py", line 349, in end_element_ns
        self._cont_handler.endElementNS(pair, None)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 357, in endElementNS
        self.context.end()
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 537, in end
        self.stack.pop().finish()
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 684, in finish
        args = toargs(context, *self.argdata)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 1376, in toargs
        args[str(name)] = field.fromUnicode(s)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/fields.py", line 229, in fromUnicode
        v = vt.fromUnicode(s)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/fields.py", line 139, in fromUnicode
        value = self.context.resolve(name)
      File "/Applications/Plone/buildout-cache/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 180, in resolve
        mod = __import__(mname, *_import_chickens)
      File "/Applications/Plone/buildout-cache/eggs/collective.xdv-1.0rc11-py2.6.egg/collective/xdv/transform.py", line 4, in <module>
        from lxml import etree
    ZopeXMLConfigurationError: File "/Applications/Plone/zinstance/parts/instance/etc/site.zcml", line 16.2-16.23
        ZopeXMLConfigurationError: File "/Applications/Plone/buildout-cache/eggs/Plone-4.0.1-py2.6.egg/Products/CMFPlone/configure.zcml", line 94.4-98.10
        ZopeXMLConfigurationError: File "/Applications/Plone/buildout-cache/eggs/collective.xdv-1.0rc11-py2.6.egg/collective/xdv/configure.zcml", line 25.4-28.10
        ImportError: dlopen(/Applications/Plone/buildout-cache/eggs/lxml-2.2.4-py2.6-macosx-10.4-i386.egg/lxml/etree.so, 2): no suitable image found.  Did find:
        /Applications/Plone/buildout-cache/eggs/lxml-2.2.4-py2.6-macosx-10.4-i386.egg/lxml/etree.so: mach-o, but wrong architecture

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

请你别敷衍 2024-12-04 04:43:18

你的 lxml Egg 似乎有构建/编译问题,这对于 OS X 人员来说很常见。试试这个:

http://plone.org/文档/错误/python-crashes-on-mac-os-x-lxml-相关

Your lxml egg seems to have build/compile problem, which is common for OS X folk. Try this:

http://plone.org/documentation/error/python-crashes-on-mac-os-x-lxml-related

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文