ImportError: No module named ImplPython
There are two usual causes for this error
- Wrong Python native extension version
- Wrong zope.component version (after year 2009, see below)
Python native extension conflict
This error appears, because Zope AccessControl module fails to import. AccessControl is one of the first Python extension modules (programming in native C language) to import when Zope is started. Python extension modules are not compatible between different Python versions, meaning that usually you have mixed files from two incompatible Python installations.
If you are on Windows make sure that Python environment and Plone are using sane, unified, DLL file base. Because Windows can have several Python installations (C:Python24, C:Python25, etc.) you need to make sure that files from the wrong installation are not used in any case.
If you are on Unix and have copied Plone from another server, delete parts/zope2 folder and eggs/ folder contents. This will trigger egg rebuilding for your system on the next run of buildout.
This error may also mask other errors. Edit parts/zope2/lib/python/AccessControl/ImplC.py:
try: from cAccessControl import rolesForPermissionOn, \ PermissionRole, imPermissionRole, _what_not_even_god_should_do, \ RestrictedDTMLMixin, aq_validate, guarded_getattr, \ setDefaultBehaviors from cAccessControl import ZopeSecurityPolicy as cZopeSecurityPolicy from cAccessControl import SecurityManager as cSecurityManager except ImportError: raise # THIS LINE HAS BEEN ADDED TO SEE THE ACTUAL EXCEPTION
And restart instance. Now you should get a different exception.
zope.component version error
Recently (early 2009) there has been an issue with zope.component versions. zope.component package was updated, but the new update is not compatible with Plone 3.x. Under some circumstances, the wrong version of zope.component is picked.
The workaround is to pin down zope.component version in buildout.cfg:
[buildout] ... versions=versions [versions] zope.component=3.5.1
Also make sure that your system wide Python installation does not have any zope packages installed. Remove all zope packages in ''/usr/lib/python2.4/site-packages''.