[yt-users] Updated yt dev and now have strange plotting error

Nathan Goldbaum nathan12343 at gmail.com
Fri Jun 24 13:33:39 PDT 2016


Hmm, this is annoying. Pip itself seems to be broken, or has broken itself
in the process of updating matplotlib. I'm sorry that my advice put you
into a situation that's hard to recover from.

Can you update pip itself?

$ pip install -U pip

If you're not able to do that and pip itself is completely broken, you
should be able to recreate a working python environment from scratch by
re-running the install script:

http://bitbucket.org/yt_analysis/yt/raw/yt/doc/install_script.sh

-Nathan

On Fri, Jun 24, 2016 at 3:10 PM, Stephanie Tonnesen <stonnes at gmail.com>
wrote:

> Hi Nathan,
>
> So I tried to do that and now yt is totally broken.
>
> Here is the printout after I typed in
> $pip install -U matplotlib
>
>
> Collecting matplotlib
>   Downloading matplotlib-1.5.1.tar.gz (54.0MB)
>     100% |################################| 54.0MB 8.8kB/s
> Collecting numpy>=1.6 (from matplotlib)
>   Downloading numpy-1.11.0.tar.gz (4.2MB)
>     100% |################################| 4.2MB 105kB/s
> Collecting python-dateutil (from matplotlib)
>   Downloading python_dateutil-2.5.3-py2.py3-none-any.whl (201kB)
>     100% |################################| 204kB 1.2MB/s
> Collecting pytz (from matplotlib)
>   Downloading pytz-2016.4-py2.py3-none-any.whl (480kB)
>     100% |################################| 483kB 762kB/s
> Collecting cycler (from matplotlib)
>   Downloading cycler-0.10.0-py2.py3-none-any.whl
> Collecting pyparsing!=2.0.4,>=1.5.6 (from matplotlib)
>   Downloading pyparsing-2.1.5-py2.py3-none-any.whl (42kB)
>     100% |################################| 45kB 8.7MB/s
> Requirement already up-to-date: six>=1.5 in
> ./yt-x86_64/lib/python2.7/site-packages/six-1.10.0-py2.7.egg (from
> python-dateutil->matplotlib)
> Building wheels for collected packages: matplotlib, numpy
>   Running setup.py bdist_wheel for matplotlib
>   Stored in directory:
> /home/stonnes/.cache/pip/wheels/d8/38/3c/a388e11fd09f9b23f5e4cd74594197394d9fd65f91f64c4aa7
>   Running setup.py bdist_wheel for numpy
>   Stored in directory:
> /home/stonnes/.cache/pip/wheels/d9/cc/5c/f60303cc48ac18e6bd359aa88e4fa50e8bd88fc7e9f001cfd8
> Successfully built matplotlib numpy
> Installing collected packages: numpy, python-dateutil, pytz, cycler,
> pyparsing, matplotlib
>   Found existing installation: numpy 1.9.2
>     DEPRECATION: Uninstalling a distutils installed project (numpy) has
> been deprecated and will be removed in a future version. This is due to the
> fact that uninstalling a distutils project will only partially uninstall
> the project.
>     Uninstalling numpy-1.9.2:
>       Successfully uninstalled numpy-1.9.2
>   Found existing installation: python-dateutil 2.4.2
>     Uninstalling python-dateutil-2.4.2:
>       Successfully uninstalled python-dateutil-2.4.2
>   Found existing installation: pytz 2015.7
>     Uninstalling pytz-2015.7:
>       Successfully uninstalled pytz-2015.7
>   Found existing installation: pyparsing 2.0.7
>     Uninstalling pyparsing-2.0.7:
>       Successfully uninstalled pyparsing-2.0.7
>   Found existing installation: matplotlib 1.4.3
>     Uninstalling matplotlib-1.4.3:
>       Successfully uninstalled matplotlib-1.4.3
> Successfully installed cycler matplotlib numpy pyparsing python-dateutil
> pytz
> Traceback (most recent call last):
>   File "/home/stonnes/yt-x86_64/bin/pip", line 11, in <module>
>     sys.exit(main())
>   File
> "/home/stonnes/yt-x86_64/lib/python2.7/site-packages/pip/__init__.py", line
> 217, in main
>     return command.main(cmd_args)
>   File
> "/home/stonnes/yt-x86_64/lib/python2.7/site-packages/pip/basecommand.py",
> line 248, in main
>     pip_version_check(session)
>   File
> "/home/stonnes/yt-x86_64/lib/python2.7/site-packages/pip/utils/outdated.py",
> line 102, in pip_version_check
>     installed_version = get_installed_version("pip")
>   File
> "/home/stonnes/yt-x86_64/lib/python2.7/site-packages/pip/utils/__init__.py",
> line 858, in get_installed_version
>     working_set = pkg_resources.WorkingSet()
>   File
> "/home/stonnes/yt-x86_64/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py",
> line 629, in __init__
>     self.add_entry(entry)
>   File
> "/home/stonnes/yt-x86_64/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py",
> line 685, in add_entry
>     for dist in find_distributions(entry, True):
>   File
> "/home/stonnes/yt-x86_64/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py",
> line 2075, in find_eggs_in_zip
>     if metadata.has_metadata('PKG-INFO'):
>   File
> "/home/stonnes/yt-x86_64/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py",
> line 1605, in has_metadata
>     return self.egg_info and self._has(self._fn(self.egg_info, name))
>   File
> "/home/stonnes/yt-x86_64/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py",
> line 1963, in _has
>     return zip_path in self.zipinfo or zip_path in self._index()
>   File
> "/home/stonnes/yt-x86_64/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py",
> line 1843, in zipinfo
>     return self._zip_manifests.load(self.loader.archive)
>   File
> "/home/stonnes/yt-x86_64/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py",
> line 1783, in load
>     mtime = os.stat(path).st_mtime
> OSError: [Errno 2] No such file or directory:
> '/home/stonnes/yt-x86_64/lib/python2.7/site-packages/pytz-2015.7-py2.7.egg'
>
>
> --
> Dr. Stephanie Tonnesen
> Alvin E. Nashman Postdoctoral Fellow
> Carnegie Observatories, Pasadena, CA
> stonnes at gmail.com
>
> On Fri, Jun 24, 2016 at 12:56 PM, Nathan Goldbaum <nathan12343 at gmail.com>
> wrote:
>
>> Hi Stephanie,
>>
>> The quick fix is to update your matplotlib installation:
>>
>> $ pip install -U matplotlib
>>
>> There's an open pull request that fixes your issue, it should be merged
>> soon:
>>
>>
>> https://bitbucket.org/yt_analysis/yt/pull-requests/2234/fix-compatibility-with-matplotlib-143-and/diff
>>
>> -Nathan
>>
>> On Fri, Jun 24, 2016 at 2:39 PM, Stephanie Tonnesen <stonnes at gmail.com>
>> wrote:
>>
>>> Hi yt-users,
>>>
>>> I just updated my yt dev and suddenly my plotting scripts don't work.
>>> When I actually try and save my plot, I am told that I don't have "classic"
>>> style available.  I am not sure where this problem is coming from, does
>>> anyone have some advice for me?
>>>
>>> The code commands:
>>>
>>> ds =
>>> yt.load("/data001/stonnes/MWtype_BPtest/DD"+loop[i]+"/DDMWtestf"+loop[i])
>>> ds.add_field(('gas','tracer'),function=tfrac)
>>> logs = {('index','cylindrical_r'):False}
>>> logs = {('gas','velocity_z'):False}
>>> logs = {('gas','velocity_x'):False}
>>> logs = {('gas','velocity_y'):False}
>>> logs = {('gas','tracer'):False}
>>>
>>> ds.index
>>> ds.field_info['gas','velocity_z'].take_log = False
>>> ds.field_info['gas','velocity_x'].take_log = False
>>>
>>> plot6p = yt.ProjectionPlot(ds,"z","density")
>>> plot6p.save()
>>>
>>> The error message:
>>>
>>> yt : [INFO     ] 2016-06-24 12:25:04,736 Parameters:
>>> current_time              = 0
>>> yt : [INFO     ] 2016-06-24 12:25:04,736 Parameters:
>>> domain_dimensions         = [256 256 256]
>>> yt : [INFO     ] 2016-06-24 12:25:04,736 Parameters:
>>> domain_left_edge          = [ 0.  0.  0.]
>>> yt : [INFO     ] 2016-06-24 12:25:04,737 Parameters:
>>> domain_right_edge         = [ 1.  1.  1.]
>>> yt : [INFO     ] 2016-06-24 12:25:04,737 Parameters:
>>> cosmological_simulation   = 0.0
>>>
>>> Parsing Hierarchy :   0%|          | 0/2503 [00:00<?, ?it/s]
>>> Parsing Hierarchy : 100%|##########| 2503/2503 [00:00<00:00,
>>> 33786.39it/s]
>>> yt : [INFO     ] 2016-06-24 12:25:04,952 Gathering a field list (this
>>> may take a moment.)
>>> yt : [INFO     ] 2016-06-24 12:25:50,114 Projection completed
>>> yt : [INFO     ] 2016-06-24 12:25:50,328 xlim = 0.000000 1.000000
>>> yt : [INFO     ] 2016-06-24 12:25:50,328 ylim = 0.000000 1.000000
>>> yt : [INFO     ] 2016-06-24 12:25:50,329 xlim = 0.000000 1.000000
>>> yt : [INFO     ] 2016-06-24 12:25:50,329 ylim = 0.000000 1.000000
>>> yt : [INFO     ] 2016-06-24 12:25:50,336 Making a fixed resolution
>>> buffer of (('gas', 'density')) 800 by 800
>>> yt : [INFO     ] 2016-06-24 12:25:51,408 Saving plot
>>> DDMWtestf0000_Projection_z_density.png
>>> Traceback (most recent call last):
>>>   File "yt_slicesonly_allouts.py", line 29, in <module>
>>>     plot6p.save()
>>>   File
>>> "/home/stonnes/yt-x86_64/src/yt-hg/yt/visualization/plot_container.py",
>>> line 79, in newfunc
>>>     rv = f(*args, **kwargs)
>>>   File
>>> "/home/stonnes/yt-x86_64/src/yt-hg/yt/visualization/plot_container.py",
>>> line 575, in save
>>>     names.append(v.save(n, mpl_kwargs))
>>>   File
>>> "/home/stonnes/yt-x86_64/src/yt-hg/yt/visualization/base_plot_types.py",
>>> line 104, in save
>>>     with matplotlib_style_context():
>>>   File "/home/stonnes/yt-x86_64/lib/python2.7/contextlib.py", line 17,
>>> in __enter__
>>>     return self.gen.next()
>>>   File
>>> "/home/stonnes/yt-x86_64/lib/python2.7/site-packages/matplotlib-1.4.3-py2.7-linux-x86_64.egg/matplotlib/style/core.py",
>>> line 86, in context
>>>     use(name)
>>>   File
>>> "/home/stonnes/yt-x86_64/lib/python2.7/site-packages/matplotlib-1.4.3-py2.7-linux-x86_64.egg/matplotlib/style/core.py",
>>> line 66, in use
>>>     raise ValueError(msg % style)
>>> ValueError: 'classic' not found in the style library and input is not a
>>> valid URL or path. See `style.available` for list of available styles.
>>>
>>> Thanks!
>>> Stephanie
>>> --
>>> Dr. Stephanie Tonnesen
>>> Alvin E. Nashman Postdoctoral Fellow
>>> Carnegie Observatories, Pasadena, CA
>>> stonnes at gmail.com
>>>
>>> _______________________________________________
>>> 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
>>
>>
>
> _______________________________________________
> 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/20160624/53ce765c/attachment.htm>


More information about the yt-users mailing list