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