<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Ryan,<div class=""><br class=""></div><div class=""><div style="orphans: 2; widows: 2;" class="">I just downloaded FLASH4.6 and <i class="">python setup.py install<i class=""> <span style="caret-color: rgb(0, 0, 0); background-color: rgb(246, 252, 252);" class="">--</span></i></i><span class=""><i class="">user</i> return </span></div><div style="orphans: 2; widows: 2;" class=""><span class=""><br class=""></span></div><div style="orphans: 2; widows: 2;" class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  File "setup.py", line 42</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    print "RELEASE file not found at " + release_path</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">                                     ^</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">SyntaxError: Missing parentheses in call to 'print'. Did you mean print("RELEASE file not found at " + release_path)?</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><span class="">The <> operator still appear in utils.py. I am not sure if this python tool also changed to python3. Using python2.7 gives</span></div><div style="orphans: 2; widows: 2;" class=""><span class=""><br class=""></span></div><div style="orphans: 2; widows: 2;" class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Traceback (most recent call last):</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  File "setup.py", line 207, in <module></span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    run_setup()</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  File "setup.py", line 199, in run_setup</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    make_bash_completion()</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  File "setup.py", line 118, in make_bash_completion</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    import flash.flmake.__init__</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">ImportError: No module named flash.flmake.__init__</span></div></div><span class=""> </span></div><div class=""><span class="">I see the flamake lines here.</span></div><div class=""><span class=""><a href="http://flash.uchicago.edu/site/flashcode/user_support/tools4b/usersguide/output.html#" class="">http://flash.uchicago.edu/site/flashcode/user_support/tools4b/usersguide/output.html#</a></span></div><div class=""><span class=""><br class=""></span></div><div class="">All I need to do is to extract the data from hdf5 file for plotting, i.e.</div><div class=""><br class=""></div><div class=""><pre style="overflow: auto hidden; padding: 5px; background-color: rgb(246, 252, 252); border-style: solid; border-color: rgb(128, 133, 138); border-width: 1px 1px 1px 4px; color: rgb(0, 0, 0); line-height: 15.600000381469727px;" class=""><span style="font-size: 12px;" class=""><span class="kn" style="color: rgb(0, 136, 0); font-weight: bold;">from</span> <span class="nn" style="color: rgb(187, 0, 102); font-weight: bold;">flash</span> <span class="kn" style="color: rgb(0, 136, 0); font-weight: bold;">import</span> <span class="n">output</span>
<span class="kn" style="color: rgb(0, 136, 0); font-weight: bold;">import</span> <span class="nn" style="color: rgb(187, 0, 102); font-weight: bold;">matplotlib.pyplot</span> <span class="kn" style="color: rgb(0, 136, 0); font-weight: bold;">as</span> <span class="nn" style="color: rgb(187, 0, 102); font-weight: bold;">plt</span>
<span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">z</span> <span class="o">=</span> <span class="n">output</span><span class="o">.</span><span class="n">slice</span><span class="p">(</span><span class="mi" style="color: rgb(0, 0, 221); font-weight: bold;">2</span><span class="p">,</span> <span class="mf" style="color: rgb(0, 0, 221); font-weight: bold;">0.0</span><span class="p">,</span> <span class="s" style="color: rgb(221, 34, 0); background-color: rgb(255, 240, 240);">'dens'</span><span class="p">,</span> <span class="s" style="color: rgb(221, 34, 0); background-color: rgb(255, 240, 240);">"<path to chk>"</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">imshow</span><span class="p">(</span><span class="n">z</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">show</span><span class="p">()</span></span></pre></div><div class=""><span class=""><br class=""></span><span class=""><div class="">Regards,<br class="">Jian Fuh<br class=""><br class=""><br class=""></div></span><span class=""></span><span class=""><br class=""><blockquote type="cite" class="">On 31 May 2021, at 7:14 PM, Ryan Farber <<a href="mailto:rjfarber@umich.edu" class="">rjfarber@umich.edu</a>> wrote:<br class=""><br class="">Hi Ong,<br class=""><br class="">Unfortunately, I appear to have deleted my FLASH 4.6.2 installation. I had thought it should be fine with python3 but can't confirm at this time. However, the user guide suggests python3 compatibility since FLASH 4.6 as I had thought so perhaps there is some improper link for the download of FLASH 4.6.2 pointing to an older version?<br class=""><a href="http://flash.uchicago.edu/site/flashcode/user_support/flash4_ug_4p62/node6.html" class="">http://flash.uchicago.edu/site/flashcode/user_support/flash4_ug_4p62/node6.html</a><br class=""><br class="">Regarding the flmake lines in the user guide, where do you see that? I haven't used that tool before. I don't see flmake referenced in the quickstart guide (just double-checked)<br class="">http://flash.uchicago.edu/site/flashcode/user_support/flash4_ug_4p62/node13.html.<br class=""><br class="">If you don't require FLASH 4.6.2 you can see if FLASH4.6 setup works with your python3 environment (there shouldn't be those diamond operators except in older version of FLASH). However, I'm pretty sure python 2.7 will work if you don't use flmake since the error you reported had to do with that tool.<br class=""><br class="">Best,<br class="">--------<br class="">Ryan<br class=""><br class=""><br class="">On Sun, May 30, 2021 at 11:46 PM Ong Jian Fuh <jianfuh.ong@eli-np.ro> wrote:<br class="">Dear Ryan,<br class=""><br class="">Thanks for your reply. I am using FLASH4.6.2 and I believe this is the latest version. I still need to replace print msg to print(msg), which is still in python2.7. Fixing the symbol with "!=" then many more issues exist as you suggested. Such as <br class=""><br class=""> File "/home/ong/.local/lib/python3.8/site-packages/flash/flmake/setup_globals.py", line 204, in set<br class="">    if type(value) != types.StringType:<br class="">AttributeError: module 'types' has no attribute 'StringType'<br class=""><br class="">Then I try using python2.7. and return the following error<br class=""><br class="">Writing /home/ong/.local/lib/python2.7/site-packages/flash-0.1.egg-info<br class="">Traceback (most recent call last):<br class="">  File "setup.py", line 207, in <module><br class="">    run_setup()<br class="">  File "setup.py", line 199, in run_setup<br class="">    make_bash_completion()<br class="">  File "setup.py", line 118, in make_bash_completion<br class="">    import flash.flmake.__init__<br class="">ImportError: No module named flash.flmake.__init__<br class=""><br class="">Is there any update from FLASH's python tools to python3? I am using jupyter notebook which run on python3.8.8. Switching from one version to another would be quite troublesome. <br class=""><br class="">In addition, I am not clear what the following lines in the user's guide do and how it relate to the simulation<br class=""><br class=""><div class="">$ mkdir temp</div><div class="">$ cd temp</div><div class="">$ flmake setup -auto Sedov</div><div class="">$ flmake build -j 20</div><div class="">$ flmake run -n 20</div><br class=""><div class="">Regards,</div><div class=""><br class=""></div><div class="">Dr. Ong Jian Fuh</div><div class="">Extreme Light Infrastructure - Nuclear Physics</div><div class="">"Horia Hulubei" National Institute for Physics and Nuclear Engineering</div><div class="">30 Reactorului Street, 077125 Magurele (Ilfov), Romania</div><br class="Apple-interchange-newline">www.eli-np.ro<br class="">On 28/05/2021 6:06 pm, Ryan Farber wrote:<br class=""><blockquote type="cite" class="">Hi Ong,<br class=""><br class="">I remember being mystified the first time I encountered that archaic "diamond operator."<br class=""><br class="">The easiest solutions are:<br class="">1. Use the latest FLASH, where they updated the python code to be compatible with python3<br class="">2. Use python2 if you need to use an old version of FLASH (like me :))<br class=""><br class="">Or, you can replace "<>" with "!=", although there will be many more issues you'll subsequently need to convert.<br class=""><br class="">Best,<br class="">--------<br class="">Ryan<br class=""><br class=""><br class="">On Fri, May 28, 2021 at 8:33 AM Ong Jian Fuh <jianfuh.ong@eli-np.ro> wrote:<br class="">Dear all,<br class=""><br class="">Good afternoon. I am trying to install the FLASH python tools for the plotting. <br class=""><br class="">Doing python setup.py install --user <br class=""><br class="">return <br class=""><br class="">running install<br class="">running build<br class="">running build_py<br class="">copying python/metadata.json -> build/lib/flash<br class="">running build_scripts<br class="">running install_lib<br class="">copying build/lib/flash/metadata.json -> /home/ong/.local/lib/python3.8/site-packages/flash<br class="">byte-compiling /home/ong/.local/lib/python3.8/site-packages/flash/flmake/utils.py to utils.cpython-38.pyc<br class="">  File "/home/ong/.local/lib/python3.8/site-packages/flash/flmake/utils.py", line 423<br class="">    if len(parts) <> 2:<br class="">                         ^<br class="">SyntaxError: invalid syntax<br class=""><br class="">I am using python3.8. What can I do to fix this or use it with new python? Thanks.  <br class=""><br class=""><div class="">-- </div><div class="">Regards,</div><div class=""><br class=""></div><div class="">Dr. Ong Jian Fuh</div><div class="">Extreme Light Infrastructure - Nuclear Physics</div><div class="">"Horia Hulubei" National Institute for Physics and Nuclear Engineering</div><div class="">30 Reactorului Street, 077125 Magurele (Ilfov), Romania</div><br class="Apple-interchange-newline">www.eli-np.ro<br class=""></blockquote></blockquote></span><br class=""></div></body></html>