Missing packages on any build/install (e.g. astropy.nddata)

175 views
Skip to first unread message

Kevin Lacaille

unread,
Jan 5, 2017, 4:34:23 PM1/5/17
to astropy-dev
Hello,

No matter the way I install Astropy I do not seem to have all Astropy packages installed. I have tried this for all versions of Astropy (up to and including 1.3).

I've tried:

1.) Downloading the source code then running:
  - python setup.py build
  - python setup.py install

2.) Pip:
  - pip install --no-deps astropy

Neither method gives me any error messages while installing, however when I search for the package astropy.nddata I find nothing. These installs only give me the following packages:

astropy.conf              astropy.log               astropy.tests

astropy.config            astropy.logger            astropy.utils

astropy.cython_version    astropy.online_docs_root  astropy.version

astropy.extern            astropy.online_help       

astropy.find_api_page     astropy.test        



What I find interesting is that astropy.nddata should exist as I find it here:


/Library/Python/2.7/site-packages/astropy-1.2.2-py2.7-macosx-10.10-intel.egg/astropy/nddata/



I am running this on Mac OSX 10.10.3 and bellow I will give examples from version 1.2.2.


Some issues I have noticed are the following:

1) importing astropy gives me this message:

In [1]: import astropy

/Library/Python/2.7/site-packages/astropy-1.2.2-py2.7-macosx-10.10-intel.egg/astropy/utils/introspection.py:153: UserWarning: Module readline was already imported from /Library/Python/2.7/site-packages/IPython/utils/rlineimpl.pyc, but /Library/Python/2.7/site-packages/readline-6.2.4.1-py2.7-macosx-10.7-intel.egg is being added to sys.path

  from pkg_resources import parse_version


2) astropy.test() results in an error message.

In [2]: astropy.test()

---------------------------------------------------------------------------

ImportError                               Traceback (most recent call last)

<ipython-input-2-572f3607969c> in <module>()

----> 1 astropy.test()


/Library/Python/2.7/site-packages/astropy-1.2.2-py2.7-macosx-10.10-intel.egg/astropy/utils/decorators.py in test(package, test_path, args, plugins, verbose, pastebin, remote_data, pep8, pdb, coverage, open_files, parallel, docs_path, skip_docs, repeat)

    634             name = func.__name__

    635 

--> 636         func = make_function_with_signature(func, name=name, **wrapped_args)

    637         func = functools.update_wrapper(func, wrapped, assigned=assigned,

    638                                         updated=updated)


/Library/Python/2.7/site-packages/astropy-1.2.2-py2.7-macosx-10.10-intel.egg/astropy/tests/runner.pyc in test(*args, **kwargs)

    270         @wraps(runner.run_tests, ('__doc__',), exclude_args=('self',))

    271         def test(*args, **kwargs):

--> 272             return runner.run_tests(*args, **kwargs)

    273 

    274         module = find_current_module(2)


/Library/Python/2.7/site-packages/astropy-1.2.2-py2.7-macosx-10.10-intel.egg/astropy/tests/runner.pyc in run_tests(self, package, test_path, args, plugins, verbose, pastebin, remote_data, pep8, pdb, coverage, open_files, parallel, docs_path, skip_docs, repeat)

    244         # impossible to test packages that define Table types on their

    245         # own.

--> 246         from ..table import Table  # pylint: disable=W0611

    247 

    248         # Have to use nested with statements for cross-Python support


/Library/Python/2.7/site-packages/astropy-1.2.2-py2.7-macosx-10.10-intel.egg/astropy/table/__init__.py in <module>()

     26 

     27 

---> 28 from .column import Column, MaskedColumn

     29 from .groups import TableGroups, ColumnGroups

     30 from .table import Table, QTable, TableColumns, Row, TableFormatter, NdarrayMixin


/Library/Python/2.7/site-packages/astropy-1.2.2-py2.7-macosx-10.10-intel.egg/astropy/table/column.py in <module>()

     13 from ..units import Unit, Quantity

     14 from ..utils.compat import NUMPY_LT_1_8

---> 15 from ..utils.console import color_print

     16 from ..utils.metadata import MetaData

     17 from ..utils.data_info import BaseColumnInfo, dtype_info_name


/Library/Python/2.7/site-packages/astropy-1.2.2-py2.7-macosx-10.10-intel.egg/astropy/utils/console.py in <module>()

     36     IPythonIOStream = None

     37 else:

---> 38     from IPython import version_info

     39     ipython_major_version = version_info[0]

     40 


ImportError: cannot import name version_info



Any help is greatly appreciated. 


Cheers,


Kevin

Matt Craig

unread,
Jan 5, 2017, 10:14:13 PM1/5/17
to astropy-dev
Hi Kevin,

Can you provide a few more details:

1. Which python distribution are you using? i.e. is this homebrew, or the system python, or an installer form python.org
2. What happens when you do: from astropy.nddata import NDData
3. What are the outputs of 'which python' and of 'which ipython'?

Thanks,
Matt Craig


--
You received this message because you are subscribed to the Google Groups "astropy-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to astropy-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kevin Lacaille

unread,
Jan 6, 2017, 11:11:57 AM1/6/17
to astropy-dev
Hi Matt,

1. I am running python 2.7.6., which I believe I installed from python.org
2. When I run "from astropy.nddata import NDData" in python it works, however it does not work in ipython. Here is the output from ipython.

ImportError                               Traceback (most recent call last)

<ipython-input-1-d5a9f46818fa> in <module>()

----> 1 from astropy.nddata import NDData


/Library/Python/2.7/site-packages/astropy/nddata/__init__.py in <module>()

     22 

     23 from .compat import *

---> 24 from .utils import *

     25 

     26 from .. import config as _config


/Library/Python/2.7/site-packages/astropy/nddata/utils.py in <module>()

     11 from .decorators import support_nddata

     12 from .. import units as u

---> 13 from ..coordinates import SkyCoord

     14 from ..extern.six.moves import range, zip

     15 from ..utils import lazyproperty


/Library/Python/2.7/site-packages/astropy/coordinates/__init__.py in <module>()

     11 from .errors import *

     12 from .angles import *

---> 13 from .baseframe import *

     14 from .distances import *

     15 from .earth import *


/Library/Python/2.7/site-packages/astropy/coordinates/baseframe.py in <module>()

   1380 # doing this import at the bottom prevents a circular import issue that is

   1381 # otherwise present due to EarthLocation needing to import ITRS

-> 1382 from .earth import EarthLocation


/Library/Python/2.7/site-packages/astropy/coordinates/earth.py in <module>()

     15 from ..utils.compat.numpy import broadcast_to

     16 from .angles import Longitude, Latitude

---> 17 from .builtin_frames import ITRS, GCRS

     18 from .representation import CartesianRepresentation

     19 from .errors import UnknownSiteException


/Library/Python/2.7/site-packages/astropy/coordinates/builtin_frames/__init__.py in <module>()

     26 

     27 from .icrs import ICRS

---> 28 from .fk5 import FK5

     29 from .fk4 import FK4, FK4NoETerms

     30 from .galactic import Galactic


/Library/Python/2.7/site-packages/astropy/coordinates/builtin_frames/fk5.py in <module>()

     10 from .. import earth_orientation as earth

     11 

---> 12 from .utils import EQUINOX_J2000

     13 

     14 


/Library/Python/2.7/site-packages/astropy/coordinates/builtin_frames/utils.py in <module>()

     15 from ... import _erfa as erfa

     16 from ...time import Time

---> 17 from ...utils import iers

     18 from ...utils.exceptions import AstropyWarning

     19 


/Library/Python/2.7/site-packages/astropy/utils/iers/__init__.py in <module>()

      2                         unicode_literals)

      3 

----> 4 from .iers import *


/Library/Python/2.7/site-packages/astropy/utils/iers/iers.py in <module>()

     23 from ... import config as _config

     24 from ... import units as u

---> 25 from ...table import Table, QTable

     26 from ...utils.data import get_pkg_data_filename, clear_download_cache

     27 from ... import utils


/Library/Python/2.7/site-packages/astropy/table/__init__.py in <module>()

     41 

     42 

---> 43 from .column import Column, MaskedColumn

     44 from .groups import TableGroups, ColumnGroups

     45 from .table import (Table, QTable, TableColumns, Row, TableFormatter,


/Library/Python/2.7/site-packages/astropy/table/column.py in <module>()

     14 from ..units import Unit, Quantity

     15 from ..utils.compat import NUMPY_LT_1_8

---> 16 from ..utils.console import color_print

     17 from ..utils.metadata import MetaData

     18 from ..utils.data_info import BaseColumnInfo, dtype_info_name


/Library/Python/2.7/site-packages/astropy/utils/console.py in <module>()

     36     IPythonIOStream = None

     37 else:

---> 38     from IPython import version_info

     39     ipython_major_version = version_info[0]

     40 


ImportError: cannot import name version_info



3. Here are the outputs:

which python:

/usr/bin/python


which ipython

/usr/local/bin/ipython



Cheers,

Kevin

To unsubscribe from this group and stop receiving emails from it, send an email to astropy-dev...@googlegroups.com.
Message has been deleted

Kevin Lacaille

unread,
Jan 6, 2017, 11:41:42 AM1/6/17
to astropy-dev
Hi again,

I just upgraded my ipython to version 5.1.0 and everything seems to be working now!

Thanks for your help.

Cheers,

Kevin

Matt Craig

unread,
Jan 6, 2017, 12:23:19 PM1/6/17
to astropy-dev
Hi Kevin,

Glad to hear it! For what it's worth, I *think* the issue may have been using python from /usr/bin (this is the apple-installed python, I think), and ipython from /usr/local/bin (which is where I believe the python.org installer creates links).

Matt

--
You received this message because you are subscribed to the Google Groups "astropy-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to astropy-dev+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages