-1

I'm trying to install Plone 3.3rc4 with plone.app.blob and repoze but nothing I've tried has worked so far. For one attempt I've pip-installed repoze.zope2, Plone, and plone.app.blob into a virtualenv. I have this version of DocumentTemplate in the virtualenv's site-packages directory and I'm trying to get it running in RHEL5.

For some reason when I try to run paster serve etc/zope2.ini in this environment way Python gives the message ImportError: No module named DT_Util? DT_Util.py exists in the directory, __init__.py is there too, and the C module it depends on is there. I suspect there's some circular dependency or failure when importing the C extension. Of course this module would work in a normal Zope install...

>>> import DocumentTemplate
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "DocumentTemplate/__init__.py", line 21, in ?
  File ".../lib/python2.4/site-packages/DocumentTemplate/DocumentTemplate.py", line 112, in ?
    from DT_String import String, File
  File ".../lib/python2.4/site-packages/DocumentTemplate/DT_String.py", line 19, in ?
    from DocumentTemplate.DT_Util import ParseError, InstanceDict
ImportError: No module named DT_Util
joeforker
  • 40,459
  • 37
  • 151
  • 246
  • Why don't you follow up your own questions? -1 – Lennart Regebro Jul 28 '09 at 05:09
  • I did edit the question in an attempt to make it more clear. I'm not sure this is a sound installation method. I've tried lots of different buildouts and have been unable to get plone.app.blob and repoze working at the same time. – joeforker Jul 28 '09 at 17:22

1 Answers1

1

I must say I doubt DocumentTemplate from Zope will work standalone. You are welcome to try though. :-)

Note that DT_Util imports C extensions:

from DocumentTemplate.cDocumentTemplate import InstanceDict, TemplateDict
from DocumentTemplate.cDocumentTemplate import render_blocks, safe_callable
from DocumentTemplate.cDocumentTemplate import join_unicode

You'll need to make sure those are compiled. My guess is that importing the cDocumentTemplate module fails and thus the import of DT_Util fails.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343