Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > possible circular import problem with python-3, but not python-2

Thread Tools

possible circular import problem with python-3, but not python-2

Darren Dale
Posts: n/a
I am attempting to contribute to the h5py project by porting the code
for python-3. The code is available in a branch at github: . That code uses cython to
wrap the hdf5 library.

So far, only a few minor changes have been needed (relative imports,
changes concerning strings/bytes), and I have been able to generate
the c sources, build and install h5py for py3k. But I can't actually
import the library. On Snow Leopard, using the python-3 installed via

>>> import h5py

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/darren/.local/lib/python3.1/site-packages/", line
34, in <module>
from . import h5, h5a, h5d, h5f, h5fd, h5g, h5l, h5o, h5i, h5p,
h5r, h5s, h5t, h5z
File "h5t.pxd", line 17, in init h5py.h5a (h5py/h5a.c:524
File "h5p.pxd", line 23, in init h5py.h5t (h5py/h5t.c:16481)
File "h5t.pxd", line 17, in init h5py.h5p (h5py/h5p.c:9297)
ImportError: No module named h5t

That looks like it might be a circular import problem, but it works
fine with python-2.6. I'm at a loss on how to proceed, could anyone
please offer a suggestion?

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why 'import module' will not import but the directorymodule? Peng Yu Python 0 10-31-2009 11:51 PM
Import - interpreter works but .py import does not John Boy Python 1 03-10-2008 04:07 AM
circular import problem Learning Python Python 1 09-09-2005 06:55 PM
Semi-circular definitions (plus circular references) Kiuhnm C++ 16 01-03-2005 03:49 AM
Newbie - circular import problem sw Python 4 02-25-2004 07:31 AM