Hi Andrew,
Much like Alex, I'm running with a hand-compiled Python 3.3 and
running into much the same error.
On Wed, Dec 5, 2012 at 1:21 PM, Andrew Collette
<
andrew....@gmail.com> wrote:
> Hi Alex,
>
>> I can't get h5py 2.1.0 to import in python 3.3 on OS X 10.8. I don't know
>> if this is also the
>> case on other architectures. However -- it works fine on python 3.2.
>
> Yes, this is an issue with Python 3.3... there are some lingering
> relative imports that have to be cleaned up. A patch has already been
> contributed so this will be in the next bugfix release.
On h5py 2.1.2, I see something similar:
$ python3.3 -c "import h5py"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/mturk/yt-x86_64-py3/lib/python3.3/site-packages/h5py/__init__.py",
line 7, in <module>
from h5py import h5a, h5d, h5ds, h5f, h5fd, h5g, h5r, h5s, h5t, h5p, h5z
ImportError: cannot import name h5a
Did the patch make it in? Could this potentially be a compilation
issue on my side? The symbols in *.so all seem to resolve correctly,
but it could certainly be user error.
>
>> This seems similar to the question a few posts back about 10.8, where
>> somebody was seeing the same 'cannot import name _errors' and the
>> answer was to not use the system python -- but here I am not using system
>> python and it works for older python versions. So it may or not be related.
>
> The "cannot import name _errors" unfortunately can mean many things;
> it's the first module h5py tries to import, so you get this for a wide
> variety of compilation errors, linker errors, etc.
Here I don't see it unless I attempt to import "h5py.h5a" twice, which
I assume is a side-effect of the partial import.
>>> import h5py.h5a
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/mturk/yt-x86_64-py3/lib/python3.3/site-packages/h5py/__init__.py",
line 7, in <module>
from h5py import h5a, h5d, h5ds, h5f, h5fd, h5g, h5r, h5s, h5t, h5p, h5z
ImportError: cannot import name h5a
>>> import h5py.h5a
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/mturk/yt-x86_64-py3/lib/python3.3/site-packages/h5py/__init__.py",
line 1, in <module>
from h5py import _errors
ImportError: cannot import name _errors
Any suggestions on how to debug or fix this?
Thanks very much,
Matt
>
>> Also -- why is there no __version__ string for h5py?
>
> I had always thought of it being for SVN/CVS per-file versioning. PEP
> 396 suggests otherwise. I'm certainly happy to include it if people
> want. For the moment you can always get the full version string as
> h5py.version.version.
>
> Andrew
>
> --
> You received this message because you are subscribed to the Google Groups "h5py" group.
> To post to this group, send email to
h5...@googlegroups.com.
> To unsubscribe from this group, send email to
h5py+uns...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/h5py?hl=en.
>