<div>Hi Junhwan.</div><div><br></div>This looks like a python version issue. I believe argparse was added to the stdlib in Python 2.7, otherwise you must install it manually.<div><br></div><div>You could try pip install argparse in your current yt environment but there might be other things in yt that depend on Python 2.7. It might be easier to create a new yt environment with the install script and run on Python 2.7. I would try to use Python 2.7 either way, but I don't know of a clean way to upgrade python in your current yt environment. I hope that helps.</div>
<div><br></div><div>Best,</div><div>Casey</div><div><br><br><div class="gmail_quote">On Wed, Jul 20, 2011 at 4:04 PM, Jun-Hwan Choi <span dir="ltr"><<a href="mailto:jhchoi@pa.uky.edu">jhchoi@pa.uky.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi YT user,<br>
<br>
I recently move the stable 2.1 to development 2.2.<br>
Then I try to run simple slice script that worked with 2.1, but it crash<br>
My simple script is as follow:<br>
<br>
------------------------------<u></u>-------<br>
from yt.mods import *<br>
from yt.analysis_modules.api import EnzoSimulation<br>
import matplotlib.pylab as pylab<br>
<br>
pf = load("DD0000/DD0000")<br>
<br>
# create density slices<br>
pc = PlotCollection(pf, center=[0.5,0.5,0.5])<br>
<br>
pc.add_slice("Density", 0)<br>
pc.save("DD0000")<br>
------------------------------<u></u>--------<br>
and the error message is<br>
<br>
Traceback (most recent call last):<br>
File "SliceDenItr.py", line 1, in <module><br>
from yt.mods import *<br>
File "/home/jhchoi/common/lib/<u></u>python2.6/site-packages/yt-2.<u></u>2dev-py2.6-linux-x86_64.egg/<u></u>yt/mods.py", line 43, in <module><br>
from yt.utilities.cookbook import Intent<br>
File "/home/jhchoi/common/lib/<u></u>python2.6/site-packages/yt-2.<u></u>2dev-py2.6-linux-x86_64.egg/<u></u>yt/utilities/cookbook.py", line 30, in <module><br>
import argparse<br>
ImportError: No module named argparse<br>
<br>
Does anyone know the reason of error and way to fix it?<br>
<br>
Thanks in advance,<br>
Junhwan Choi<br>
<br>
-- <br>
<br>
------------------------------<u></u>------------------------------<u></u>--<br>
Jun-Hwan Choi, Ph.D.<br>
Department of Physics and Astronomy, University of Kentucky<br>
Tel: <a href="tel:%28859%29%20897-6737" value="+18598976737" target="_blank">(859) 897-6737</a> Fax: <a href="tel:%28859%29%20323-2846" value="+18593232846" target="_blank">(859) 323-2846</a><br>
Email: <a href="mailto:jhchoi@pa.uky.edu" target="_blank">jhchoi@pa.uky.edu</a> URL: <a href="http://www.pa.uky.edu/~jhchoi" target="_blank">http://www.pa.uky.edu/~jhchoi</a><br>
------------------------------<u></u>------------------------------<u></u>--<br>
<br>
______________________________<u></u>_________________<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" target="_blank">http://lists.spacepope.org/<u></u>listinfo.cgi/yt-users-<u></u>spacepope.org</a><br>
</blockquote></div><br></div>