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

Discussion in 'Python' started by Darren Dale, Sep 27, 2010.

  1. Darren Dale

    Darren Dale Guest

    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:
    http://github.com/darrendale/h5py/tree/py3k . 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
    MacPorts:

    >>> import h5py

    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/Users/darren/.local/lib/python3.1/site-packages/
    h5py-1.3.1.dev-py3.1-macosx-10.6-x86_64.egg/h5py/__init__.py", 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:5248)
    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?

    Thanks,
    Darren
    Darren Dale, Sep 27, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kiuhnm
    Replies:
    16
    Views:
    738
    Jonathan Mcdougall
    Jan 3, 2005
  2. sw
    Replies:
    4
    Views:
    333
    Dennis Lee Bieber
    Feb 25, 2004
  3. Learning Python

    circular import problem

    Learning Python, Sep 9, 2005, in forum: Python
    Replies:
    1
    Views:
    424
    Terry Reedy
    Sep 9, 2005
  4. John Boy
    Replies:
    1
    Views:
    311
    John Machin
    Mar 10, 2008
  5. Peng Yu
    Replies:
    0
    Views:
    324
    Peng Yu
    Oct 31, 2009
Loading...

Share This Page