[yt-users] yt installation issue

Nathan Goldbaum nathan12343 at gmail.com
Mon Apr 18 14:17:22 PDT 2016


Hi Andrea,

The "show()" command only works inside the Jupyter notebook (also known as
the IPython notebook).

You should do "slc.save('/path/to/img.png')" instead, that will save the
SlicePlot to disk as 'img.png'. The reason "show()" works in the example
you linked to is because that part of the documentation is actually a
Jupyter notebook.

More details about save() here:

http://yt-project.org/doc/visualizing/plots.html#saving-plots

-Nathan

On Mon, Apr 18, 2016 at 3:58 PM, Andrea Negri <negri.andre at gmail.com> wrote:

> Hi Matthew,
>
> that fixed the problem. However, now I'm not able to do a very simple
> plot. I took the example in
> http://yt-project.org/doc/examining/generic_array_data.html, put
> everything in test.py and this is the result, nothing appears. Am I
> doing something wrong?
>
> Thank,
> Andrea
>
>
> (yt-x86_64)andrea at zen:~/Software/yt$ ipython test.py
> yt : [INFO     ] 2016-04-18 22:55:38,406 Parameters: current_time
>         = 0.0
> yt : [INFO     ] 2016-04-18 22:55:38,406 Parameters: domain_dimensions
>         = [64 64 64]
> yt : [INFO     ] 2016-04-18 22:55:38,407 Parameters: domain_left_edge
>         = [-1.5 -1.5 -1.5]
> yt : [INFO     ] 2016-04-18 22:55:38,407 Parameters: domain_right_edge
>         = [ 1.5  1.5  1.5]
> yt : [INFO     ] 2016-04-18 22:55:38,407 Parameters:
> cosmological_simulation   = 0.0
> yt : [INFO     ] 2016-04-18 22:55:38,457 Loading field plugins.
> yt : [INFO     ] 2016-04-18 22:55:38,457 Loaded angular_momentum (8 new
> fields)
> yt : [INFO     ] 2016-04-18 22:55:38,457 Loaded astro (15 new fields)
> yt : [INFO     ] 2016-04-18 22:55:38,457 Loaded cosmology (22 new fields)
> yt : [INFO     ] 2016-04-18 22:55:38,458 Loaded fluid (64 new fields)
> yt : [INFO     ] 2016-04-18 22:55:38,459 Loaded fluid_vector (96 new
> fields)
> yt : [INFO     ] 2016-04-18 22:55:38,459 Loaded geometric (112 new fields)
> yt : [INFO     ] 2016-04-18 22:55:38,459 Loaded local (112 new fields)
> yt : [INFO     ] 2016-04-18 22:55:38,459 Loaded magnetic_field (120 new
> fields)
> yt : [INFO     ] 2016-04-18 22:55:38,459 Loaded my_plugins (120 new fields)
> yt : [INFO     ] 2016-04-18 22:55:38,460 Loaded species (122 new fields)
> yt : [INFO     ] 2016-04-18 22:55:38,686 xlim = -1.500000 1.500000
> yt : [INFO     ] 2016-04-18 22:55:38,686 ylim = -1.500000 1.500000
> yt : [INFO     ] 2016-04-18 22:55:38,688 xlim = -1.500000 1.500000
> yt : [INFO     ] 2016-04-18 22:55:38,688 ylim = -1.500000 1.500000
> yt : [INFO     ] 2016-04-18 22:55:38,689 Making a fixed resolution
> buffer of (('gas', 'density')) 800 by 800
> <yt.visualization.plot_window.AxisAlignedSlicePlot at 0x7fdf305ac450>
>
> On 18 April 2016 at 15:21, Matthew Turk <matthewturk at gmail.com> wrote:
> > Hi Andrea,
> >
> > I think a simple fix would be to set:
> >
> > ~/.config/matplotlib/matplotlibrc
> >
> > to include this:
> >
> > backend: Agg
> >
> >
> > That should fix it by not trying to import Qt.
> >
> > On Mon, Apr 18, 2016 at 6:02 AM, Andrea Negri <negri.andre at gmail.com>
> wrote:
> >> Hi all,
> >>
> >> I tried to install yt using the All-in-One Installation Script. I'm
> >> using Ubuntu 14.04, and I have installed the required packeges listed
> >> at the beginning of the script.
> >>
> >> All the installation process went fine, then I sourced the activation
> >> script in a new shell, and to check if everything was fine, I typed yt
> >> --help, and this is the output:
> >>
> >> Traceback (most recent call last):
> >>   File "/home/andrea/Software/yt/yt-x86_64/bin/yt", line 9, in <module>
> >>     load_entry_point('yt==3.2.3', 'console_scripts', 'yt')()
> >>   File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line
> >> 558, in load_entry_point
> >>   File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line
> >> 2682, in load_entry_point
> >>   File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line
> >> 2355, in load
> >>   File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line
> >> 2361, in resolve
> >>   File "/home/andrea/Software/yt/yt-x86_64/src/yt-hg/yt/__init__.py",
> >> line 146, in <module>
> >>     from yt.visualization.api import \
> >>   File
> "/home/andrea/Software/yt/yt-x86_64/src/yt-hg/yt/visualization/api.py",
> >> line 22, in <module>
> >>     from .particle_plots import \
> >>   File
> "/home/andrea/Software/yt/yt-x86_64/src/yt-hg/yt/visualization/particle_plots.py",
> >> line 24, in <module>
> >>     from .plot_window import \
> >>   File
> "/home/andrea/Software/yt/yt-x86_64/src/yt-hg/yt/visualization/plot_window.py",
> >> line 34, in <module>
> >>     from .plot_modifications import callback_registry
> >>   File
> "/home/andrea/Software/yt/yt-x86_64/src/yt-hg/yt/visualization/plot_modifications.py",
> >> line 26, in <module>
> >>     from mpl_toolkits.axes_grid1.anchored_artists import AnchoredSizeBar
> >>   File
> "/home/andrea/Software/yt/yt-x86_64/lib/python2.7/site-packages/matplotlib-1.4.3-py2.7-linux-x86_64.egg/mpl_toolkits/axes_grid1/__init__.py",
> >> line 9, in <module>
> >>     from .axes_grid import Grid, ImageGrid, AxesGrid
> >>   File
> "/home/andrea/Software/yt/yt-x86_64/lib/python2.7/site-packages/matplotlib-1.4.3-py2.7-linux-x86_64.egg/mpl_toolkits/axes_grid1/axes_grid.py",
> >> line 8, in <module>
> >>     import matplotlib.pyplot as plt
> >>   File
> "/home/andrea/Software/yt/yt-x86_64/lib/python2.7/site-packages/matplotlib-1.4.3-py2.7-linux-x86_64.egg/matplotlib/pyplot.py",
> >> line 109, in <module>
> >>     _backend_mod, new_figure_manager, draw_if_interactive, _show =
> pylab_setup()
> >>   File
> "/home/andrea/Software/yt/yt-x86_64/lib/python2.7/site-packages/matplotlib-1.4.3-py2.7-linux-x86_64.egg/matplotlib/backends/__init__.py",
> >> line 32, in pylab_setup
> >>     globals(),locals(),[backend_name],0)
> >>   File
> "/home/andrea/Software/yt/yt-x86_64/lib/python2.7/site-packages/matplotlib-1.4.3-py2.7-linux-x86_64.egg/matplotlib/backends/backend_qt4agg.py",
> >> line 17, in <module>
> >>     from .backend_qt5agg import NavigationToolbar2QTAgg
> >>   File
> "/home/andrea/Software/yt/yt-x86_64/lib/python2.7/site-packages/matplotlib-1.4.3-py2.7-linux-x86_64.egg/matplotlib/backends/backend_qt5agg.py",
> >> line 18, in <module>
> >>     from .backend_qt5 import QtCore
> >>   File
> "/home/andrea/Software/yt/yt-x86_64/lib/python2.7/site-packages/matplotlib-1.4.3-py2.7-linux-x86_64.egg/matplotlib/backends/backend_qt5.py",
> >> line 31, in <module>
> >>     from .qt_compat import QtCore, QtGui, QtWidgets, _getSaveFileName,
> >> __version__
> >>   File
> "/home/andrea/Software/yt/yt-x86_64/lib/python2.7/site-packages/matplotlib-1.4.3-py2.7-linux-x86_64.egg/matplotlib/backends/qt_compat.py",
> >> line 126, in <module>
> >>     from PySide import QtCore, QtGui, __version__, __version_info__
> >> ImportError: No module named PySide
> >>
> >>
> >>
> >> I tried different configurations, such as installing the stable and
> >> the yt branch, turn on/off the scipy installation flag in
> >> install_script.sh, but nothing.
> >>
> >> Please, do you have any suggestions?
> >>
> >>
> >>
> >> Thanks in advance,
> >> Andrea
> >> _______________________________________________
> >> 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/20160418/c5186bd0/attachment.html>


More information about the yt-users mailing list