Hi Junhwan.
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.
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.
Best,
Casey
On Wed, Jul 20, 2011 at 4:04 PM, Jun-Hwan Choi
<jhchoi@pa.uky.edu> wrote:
Hi YT user,
I recently move the stable 2.1 to development 2.2.
Then I try to run simple slice script that worked with 2.1, but it crash
My simple script is as follow:
-------------------------------------
from yt.mods import *
from yt.analysis_modules.api import EnzoSimulation
import matplotlib.pylab as pylab
pf = load("DD0000/DD0000")
# create density slices
pc = PlotCollection(pf, center=[0.5,0.5,0.5])
pc.add_slice("Density", 0)
pc.save("DD0000")
--------------------------------------
and the error message is
Traceback (most recent call last):
File "SliceDenItr.py", line 1, in <module>
from yt.mods import *
File "/home/jhchoi/common/lib/python2.6/site-packages/yt-2.2dev-py2.6-linux-x86_64.egg/yt/mods.py", line 43, in <module>
from yt.utilities.cookbook import Intent
File "/home/jhchoi/common/lib/python2.6/site-packages/yt-2.2dev-py2.6-linux-x86_64.egg/yt/utilities/cookbook.py", line 30, in <module>
import argparse
ImportError: No module named argparse
Does anyone know the reason of error and way to fix it?
Thanks in advance,
Junhwan Choi
--
--------------------------------------------------------------
Jun-Hwan Choi, Ph.D.
Department of Physics and Astronomy, University of Kentucky
Tel: (859) 897-6737 Fax: (859) 323-2846
Email: jhchoi@pa.uky.edu URL: http://www.pa.uky.edu/~jhchoi
--------------------------------------------------------------
_______________________________________________
yt-users mailing list
yt-users@lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org