[AstroPy] problem with 'test the installation' of python

Joe Philip Ninan indiajoe at gmail.com
Mon Dec 2 06:59:09 EST 2013

For the plot issue,
Try giving
after starting the ipython session before the plot command.
It will basically load numpy and matplotlib to work interactively.


If you plan to adapt the codes to script later, it is better to do plots in
the straight forward way as follows

import matplotlib.pyplot as plt


On 2 December 2013 17:10, foad hanassi-savari <
foadhanassi-savari at hotmail.co.uk> wrote:

> Hi there,
> I have installed ipython via anaconda and it seems to be working fine and
> I installed the packages as instructed on the website:
> http://python4astronomers.github.io/installation/python_install.html.
> I have installed the packages as instructed and am able to import astropy,
> aplpy, pyregion and pyparsing.
> The issue rises when trying to test the installation!  the magic cells in
> my version of the ipython (ipython(py2.7)) are written as %%python (I don't
> really understand the difference between these and the suggested test on
> the website). This is not a problem, however, %%ipython is not listed on my
> cell magic list (%lsmagic) but when I type %%ipython I don't get an error!
> print numpy.__version__, prints 1.7.1
> print scipy.__version__, prints 0.13.0
> and
> print matplotlib.__version__, gives me an error unless I import matplotlib
> (I don't know if that is a problem or not!)
> But the main issue is that I don't get a plot of sin wave, instead when I
> type (plot(x, sin(x)) I get an error saying that plot is not defined!
> Also, I am using windows.
> Can you please help me out here, I am planning to study astrophysics and I
> really need/want to be good at programming.
> Thank you,
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy

"GNU/Linux: because a PC is a terrible thing to waste" -  GNU Generation

Joe Philip Ninan    http://sites.google.com/site/jpninan/
Research Scholar        /________________\
DAA,                            | Vadakeparambil |
TIFR,                           | Pullad P.O.         |
Mumbai-05, India.      | Kerala, India      |
Ph: +917738438212   | PIN:689548       |
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20131202/9298dda9/attachment.html>

More information about the AstroPy mailing list