[ZODB-Dev] ZODB 3.2 released
Jeremy Hylton
jeremy at zope.com
Fri Oct 10 10:34:51 EDT 2003
On Fri, 2003-10-10 at 10:03, Hector Sanchez SanMartin wrote:
> It also failed for me: I had many errors when running the test suite but
> checking they all seem to come from the BDB that I won't use and that I
> haven't installed so I guess those are normal.
We try to surpress error messages what BerkeleyDB itself isn't
available. Can you tell me what errors you saw?
> Apart from this, after installing, if I try to import ZODB I get an
> error in the loading of the module saying that the module cPersistence
> cannot be found:
>
> Python 2.3.2 (#1, Oct 3 2003, 15:46:29)
> [GCC 2.95.4 20011002 (Debian prerelease)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import ZODB
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "ZODB/__init__.py", line 18, in ?
> import cPersistence, Persistence
> ImportError: No module named cPersistence
>
> ...if I copy the file cPersistence.h to the ZODB package everything
> works fine. Did I do it fine? Was it my fault or is there an error in
> the package installation?
The ImportError you mention is usually caused by running from the source
directory without building C extensions in-place. Normally, distutils
puts compiled code in build/lib.linux-i686-2.3 (the last part depends on
platform and Python version). When you install, it puts it in the
standard site-packages directory.
But if you run from the top-level of the source directory, it will find
a ZODB package in that directory and attempt to use it. Since there is
no compiled cPersistence.so in this directory, the import fails. It
should work from a different directory.
Jeremy
More information about the ZODB-Dev
mailing list