[yt-users] NameError: name 'SlicePlot' is not defined
Nathan Goldbaum
nathan12343 at gmail.com
Fri Feb 22 11:40:04 PST 2013
Hi Reju,
It looks like this is a somewhat out of date installation of yt, probably
from around the fall of 2011. In order to get SlicePlot to work, you'll
need to reinstall yt, along with all of its dependencies.
We're only about a week or so away from the release of yt 2.5, so it should
be safe to install the latest development version. To do so, run the
following commands:
$ wget http://hg.yt-project.org/yt/raw/yt/doc/install_script.sh
$ bash install_script.sh
If you don't have wget, you can achieve the same result using curl:
$ curl -O http://hg.yt-project.org/yt/raw/yt/doc/install_script.sh
$ bash install_script.sh
The install script will print some instructions, you should read them and
follow any suggestions it has, which will vary depending on your operating
system.
Once you've installed the new version, you should be able to update yt by
using yt update:
$ yt update
And update all of the yt dependencies by running:
$ yt update --all
Please let us know if you have any difficulties installing the latest
version.
Cheers,
Nathan
On Fri, Feb 22, 2013 at 11:28 AM, Reju Sam John <rejusamjohn at gmail.com>wrote:
> Dear Nathan,
> this is the result..
>
> [csurajit at c0 cosmorun5]$ yt instinfo
>
> Traceback (most recent call last):
> File "/data1/software/cosmology/bin/yt", line 5, in <module>
> from pkg_resources import load_entry_point
> File
> "/data1/software/cosmology/surajit/software/cosmo/yt_analysis-yt-ca6e536c15a6/doc/yt-x86_64/lib/python2.6/site-packages/distribute-0.6.14-py2.6.egg/pkg_resources.py",
> line 16, in <module>
> import sys, os, zipimport, time, re, imp, types
> ImportError: No module named time
> [csurajit at c0 cosmorun5]$
>
>
>
> On Fri, Feb 22, 2013 at 2:24 PM, Nathan Goldbaum <nathan12343 at gmail.com>wrote:
>
>> Hi Reju,
>>
>> I'm not completely sure why SlicePlot isn't in your namespace. Can you
>> do the following at the command line:
>>
>> $ yt instinfo
>>
>> and reply with a paste of the result?
>>
>> -Nathan
>>
>>
>> On Fri, Feb 22, 2013 at 10:53 AM, Reju Sam John <rejusamjohn at gmail.com>wrote:
>>
>>> Hello all,
>>> I the following code
>>>
>>> from yt.mods import *
>>> pf = load("RD0015/RedshiftOutput0015")
>>> p= SlicePlot(pf,2,'Density','c',(20,'kpc'))
>>> p.save('sliceplot')
>>>
>>>
>>> it is showing an error
>>>
>>> *Traceback (most recent call last):
>>> File "sliceplot_Density.py", line 3, in <module>
>>> p = SlicePlot(pf,2,'Density','c',(20,'kpc'))
>>> NameError: name 'SlicePlot' is not defined*
>>>
>>>
>>> what is the reason? is there files we have to import.
>>> --
>>> Reju Sam John
>>>
>>> _______________________________________________
>>> yt-users mailing list
>>> yt-users at lists.spacepope.org
>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>
>>>
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>>
>
>
> --
> Reju Sam John
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20130222/918a3f64/attachment.html>
More information about the yt-users
mailing list