[AstroPy] Problem querying NED with astropy

Shupe, David L. shupe at ipac.caltech.edu
Sun Aug 18 11:18:37 EDT 2019

Hello Gordon,

Thank you for your inquiry about using astroquery.ned. The astroquery package is not included with Anaconda, so there is an additional installation needed for it.

Following https://astroquery.readthedocs.io/en/latest/, since you have Anaconda installed, you can do “conda install -c astropy astroquery” to get a tagged release. Or, for the latest version you can instead do “pip install --pre astroquery”.

Please feel free to contact me off-list if you have further questions, or are otherwise having trouble with the module for NED.

David Shupe

On Aug 17, 2019, at 8:11 AM, Gordon Dennis <gordon.b.dennis at gmail.com<mailto:gordon.b.dennis at gmail.com>> wrote:

Good morning
I want to use astropy on Windows 10 to query the NASA extragalactic database (NED), but I'm having a very frustrating time getting even the simplest things to work..

1.       Installed Python36.

2.       Tried pip install astropy.
Result - fatal error.

3.       Tried 2 more times
Same result.

4.       I read that if you install Python36 using the Anaconda distribution, astropy is included, so:

5.       I de-installed Python36 and …

6.       … installed Anaconda

7.       Ran the Spyder IDE (Spyder is loaded automatically with Anaconda), and tried this very simple code (it's actually an example I copied from the www.astropy.org<http://www.astropy.org/> , apart from the argument ‘NGC 1300’ which is one of the galaxies I’m studying):

from astroquery.ned import Ned
result_table = Ned.query_object("NGC 1300")
print(result_table) # an astropy.table.Table
Now you get the error message 'unable to import Ned'.  So, I guess it’s seeing astropy but failing to recognize Ned.  Obviously line 2 & 3 don’t get executed.  If I run the line
from astroquery.ned import Ned in a windows command box and execute with Python36 I get the same result.

8.       I assume (since the example above was copied from the astropy web site that ‘Ned’ with the uppercase ‘N’ is correct.  I'm now 7 hours down and beginning to loose hope.  What am I doing wrong/have missed or whatever?
Would greatly appreciate any steers you can give me.
Gordon Dennis
p.s. yes I do have admin privileges; and my Windows 10 is fully updated.

+44(0)1934 838096 / +44(0)7774628110 / Skype: gordon.dennis
Sent from my Analytical Engine

AstroPy mailing list
AstroPy at python.org<mailto:AstroPy at python.org>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20190818/3a68488d/attachment-0001.html>

More information about the AstroPy mailing list