[AstroPy] missing modules in ipython notebook

Luke Zoltan Kelley lzkelley at gmail.com
Mon Aug 11 14:42:01 EDT 2014


using 'import astropy.io' does let me access 'io' --- but then not 'io.ascii' (for example).
However, when I use 'import astropy.io' I also get access to 'astropy.table' (which I wasn't before).

Why are modules loading in such a different way from how they do in ipython (or just python)?


On Aug 11, 2014, at 11:35 AM, JJ Kavelaars <jjk at uvic.ca> wrote:

> try:
> 
> import astropy.io
> 
> help(astropy.io)
> 
> The sub-packages are not loaded when you do import astropy
> 
> JJ
> 
> On Aug 11, 2014, at 11:23 AM, Luke Zoltan Kelley <lzkelley at gmail.com> wrote:
> 
>> I'm using astropy 0.3.2 in an ipython notebook; my ipython is from canopy, version 2.1.0.  I can't access certain modules: astropy.io and astropy.table seem to be completely missing.  They don't appear in tab-completion, and if I try to access them I get something like:
>> 
>> In [8]: astropy.io
>> ERROR:astropy:AttributeError: 'module' object has no attribute 'io'
>> ERROR : AttributeError: 'module' object has no attribute 'io' [IPython.core.interactiveshell]
>> ---------------------------------------------------------------------------
>> AttributeError
>>                           Traceback (most recent call last)
>> <ipython-input-8-d9b3d4bf20e3> in <module>()
>> ----> 1 astropy.io
>> AttributeError : 'module' object has no attribute 'io'
>> 
>> 
>> Using the same version of astropy in a normal ipython session and the modules work fine.
>> 
>> Has anyone experienced any similar problems?
>> 
>> Thanks!
>> Luke
>> _______________________________________________
>> AstroPy mailing list
>> AstroPy at scipy.org
>> http://mail.scipy.org/mailman/listinfo/astropy
> 
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy




More information about the AstroPy mailing list