Problem with installing Markdown support: Failed to import ElementTree

2 messages Options
Embed this post
Permalink
Gould () Problem with installing Markdown support: Failed to import ElementTree
Reply Threaded More More options
Print post
Permalink
Hi,

I have a fresh Plone 3.2.2 installation (with Unified Installer) on Ubuntu 8.04. In order to enable Markdown support I added Markdown to the egg section of the buildout.cfg. But when running buildout I get the following error:

Getting distribution for 'Markdown'.
Traceback (most recent call last):
  File "<string>", line 1, in ?
  File "/usr/local/Plone/Python-2.4/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg/setuptools/command/easy_install.py", line 1671, in main
    with_ei_usage(lambda:
  File "/usr/local/Plone/Python-2.4/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg/setuptools/command/easy_install.py", line 1659, in with_ei_usage
    return f()
  File "/usr/local/Plone/Python-2.4/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg/setuptools/command/easy_install.py", line 1675, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "/usr/local/Plone/Python-2.4/lib/python2.4/distutils/core.py", line 149, in setup
    dist.run_commands()
  File "/usr/local/Plone/Python-2.4/lib/python2.4/distutils/dist.py", line 946, in run_commands
    self.run_command(cmd)
  File "/usr/local/Plone/Python-2.4/lib/python2.4/distutils/dist.py", line 966, in run_command
    cmd_obj.run()
  File "/usr/local/Plone/Python-2.4/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg/setuptools/command/easy_install.py", line 211, in run
    self.easy_install(spec, not self.no_deps)
  File "/usr/local/Plone/Python-2.4/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg/setuptools/command/easy_install.py", line 427, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "/usr/local/Plone/Python-2.4/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg/setuptools/command/easy_install.py", line 476, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/local/Plone/Python-2.4/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg/setuptools/command/easy_install.py", line 655, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/local/Plone/Python-2.4/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg/setuptools/command/easy_install.py", line 930, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/usr/local/Plone/Python-2.4/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg/setuptools/command/easy_install.py", line 919, in run_setup
    run_setup(setup_script, args)
  File "/usr/local/Plone/Python-2.4/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg/setuptools/sandbox.py", line 26, in run_setup
    DirectorySandbox(setup_dir).run(
  File "/usr/local/Plone/Python-2.4/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg/setuptools/sandbox.py", line 63, in run
    return func()
  File "/usr/local/Plone/Python-2.4/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg/setuptools/sandbox.py", line 29, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "setup.py", line 4, in ?
  File "/tmp/easy_install-08kt1U/Markdown-2.0/markdown/__init__.py", line 173, in ?
  File "/tmp/easy_install-08kt1U/Markdown-2.0/markdown/etree_loader.py", line 21, in importETree
  File "/tmp/easy_install-08kt1U/Markdown-2.0/markdown/__init__.py", line 112, in message
markdown.MarkdownException: Failed to import ElementTree
An error occured when trying to install Markdown 2.0.Look above this message for any errors thatwere output by easy_install.
While:
  Installing instance.
  Getting distribution for 'Markdown'.
Error: Couldn't install: Markdown 2.

Adding elementtree to the buildout.cfg doesn't help. Probably because it already exists?

/usr/local/Plone/buildout-cache/eggs/elementtree-1.2.7_20070827_preview-py2.4.egg

Chris Wayg () Re: Problem with installing Markdown support: Failed to import ElementTree
Reply Threaded More More options
Print post
Permalink
Gould wrote:
I have a fresh Plone 3.2.2 installation (with Unified Installer) on Ubuntu 8.04. In order to enable Markdown support I added Markdown to the egg section of the buildout.cfg. But when running buildout I get the following error:
...
markdown.MarkdownException: Failed to import ElementTree
Error: Couldn't install: Markdown 2

Adding elementtree to the buildout.cfg doesn't help. Probably because it already exists?.
I encountered the same error with Plone 3.2.2 on Debian Lenny in trying to use Markdown. - Strange, that it does not work with the provided ElementTree version. In case someone else will encounter the same problem, I will describe briefly what I did to get it working:

[buildout]
...
eggs =
        Markdown

will download the current Markdown version ( 2.0.1), which apparently does not find the existing ElementTree.

The first thing I tried, was to change this to:

eggs =
        Markdown==1.7

to install an earlier version, which does not depend on ElementTree. This worked without any errors.

Next I tried to use cElementTree with the current Markdown and this worked likewise.

eggs =
        cElementTree
        Markdown


Christian

Links:
http://plone.org/documentation/how-to/enable-markdown-textile-and-restructured-text-support
http://www.freewisdom.org/projects/python-markdown/Installation
http://pypi.python.org/pypi/Markdown/2.0.1
http://pypi.python.org/pypi/cElementTree/1.0.2-20050302