<div dir="ltr">Hi Cynthia,<div><br></div><div>It seems a bit unusual that your yt installation doesn't have h5py installed.  Can you tell us how you installed yt?  We can probably help you get the necessary packages installed, if you haven't managed to do that yet.</div><div><br></div><div>Britton</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jul 16, 2017 at 6:02 AM, Nathan Goldbaum <span dir="ltr"><<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div dir="auto">Hi Cynthia,</div><div dir="auto"><br></div><div dir="auto">To load Enzo data you need both the HDF5 library and the H5py python wrappers installed.</div><div dir="auto"><br></div><div dir="auto">Nathan</div><br><div class="gmail_quote"><div><div class="h5"><div>On Sun, Jul 16, 2017 at 3:17 AM Cynthia Saad (Student) <<a href="mailto:crs07@mail.aub.edu" target="_blank">crs07@mail.aub.edu</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">




<div>
<div id="m_-3650557625274514036m_-6186122891620315119divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif">
<p>dear all</p>
<p>i am using yt for enzo. my script reads:</p>
<p><br>
</p>
<p></p>
<div>import yt<br>
<br>
# Load the dataset.<br>
ds = yt.load("~/enzo/run/<wbr>CosmologySimulation/<wbr>AMRCosmology/DD0001/DD0001")<br>
<br>
# Create a 1 Mpc radius sphere, centered on the max density.<br>
sp = ds.sphere("max", (0.1, "Mpc"))<br>
<br>
# Use the total_quantity derived quantity to sum up the<br>
# values of the cell_mass and particle_mass fields<br>
# within the sphere.<br>
baryon_mass, particle_mass = sp.quantities.total_quantity([<wbr>"cell_mass", "particle_mass"])<br>
<br>
print("Total mass in sphere is %0.3e Msun (gas = %0.3e Msun, particles = %0.3e Msun)" % \<br>
      ((baryon_mass + particle_mass).in_units('Msun'<wbr>), \<br>
       baryon_mass.in_units('Msun'), particle_mass.in_units('Msun')<wbr>))</div>
<p></p>
<p>-----------<br>
</p>
<p>the error i am getting is:</p>
<p></p>
<div>~/enzo/run/<wbr>CosmologySimulation/<wbr>AMRCosmology$ python trial.py <br>
Traceback (most recent call last):<br>
  File "trial.py", line 4, in <module><br>
    ds = yt.load("~/enzo/run/<wbr>CosmologySimulation/<wbr>AMRCosmology/DD0001/DD0001")<br>
  File "/usr/local/lib/python2.7/<wbr>dist-packages/yt/convenience.<wbr>py", line 79, in load<br>
    if c._is_valid(*args, **kwargs): candidates.append(n)<br>
  File "/usr/local/lib/python2.7/<wbr>dist-packages/yt/frontends/<wbr>flash/data_structures.py", line 493, in _is_valid<br>
    fileh = HDF5FileHandler(args[0])<br>
  File "/usr/local/lib/python2.7/<wbr>dist-packages/yt/utilities/<wbr>file_handler.py", line 22, in __init__<br>
    self.handle = h5py.File(filename, 'r')<br>
  File "/usr/local/lib/python2.7/<wbr>dist-packages/yt/utilities/on_<wbr>demand_imports.py", line 31, in __call__<br>
    raise self.error<br>
ImportError: This functionality requires the h5py package to be installed.<br>
</div>
<p></p>
<p>----------------<br>
</p>
<p><br>
</p>
<p>is my script outdated, there is something wrong with my installation or deficiencies in the python libraries?</p>
<p><br>
</p>
<p>thank you</p>
<p>cynthia<br>
</p>
</div>
</div></div></div>

______________________________<wbr>_________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
</blockquote></div></div>
<br>______________________________<wbr>_________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
<br></blockquote></div><br></div>