{"action":"created","issue":{"url":"https://api.github.com/repos/astropy/astropy/issues/4467","labels_url":"https://api.github.com/repos/astropy/astropy/issues/4467/labels{/name}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/4467/comments","events_url":"https://api.github.com/repos/astropy/astropy/issues/4467/events","html_url":"https://github.com/astropy/astropy/issues/4467","id":125946731,"number":4467,"title":"1.1.1: ImportError on importing wcs and failure of astropy.test()","user":{"login":"astroleo","id":12253033,"avatar_url":"https://avatars.githubusercontent.com/u/12253033?v=3","gravatar_id":"","url":"https://api.github.com/users/astroleo","html_url":"https://github.com/astroleo","followers_url":"https://api.github.com/users/astroleo/followers","following_url":"https://api.github.com/users/astroleo/following{/other_user}","gists_url":"https://api.github.com/users/astroleo/gists{/gist_id}","starred_url":"https://api.github.com/users/astroleo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astroleo/subscriptions","organizations_url":"https://api.github.com/users/astroleo/orgs","repos_url":"https://api.github.com/users/astroleo/repos","events_url":"https://api.github.com/users/astroleo/events{/privacy}","received_events_url":"https://api.github.com/users/astroleo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-11T13:45:20Z","updated_at":"2016-01-11T13:46:38Z","closed_at":null,"body":"`from astropy import wcs` fails with the following error on my fresh installation of astropy 1.1.1 on Mac OS X 10.11.2:\r\n```\r\nIn [1]: from astropy import wcs\r\n---------------------------------------------------------------------------\r\nImportError                               Traceback (most recent call last)\r\n<ipython-input-1-3a8fe028b946> in <module>()\r\n----> 1 from astropy import wcs\r\n\r\n/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astropy/wcs/__init__.py in <module>()\r\n     28 try:\r\n     29     # Not guaranteed available at setup time\r\n---> 30     from .wcs import *\r\n     31     from . import utils\r\n     32 except ImportError:\r\n\r\n/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astropy/wcs/wcs.py in <module>()\r\n     48 from . import _docutil as __\r\n     49 try:\r\n---> 50     from . import _wcs\r\n     51 except ImportError:\r\n     52     if not _ASTROPY_SETUP_:\r\n\r\nImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astropy/wcs/_wcs.cpython-35m-darwin.so, 2): Symbol not found: _wcslib_version\r\n  Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astropy/wcs/_wcs.cpython-35m-darwin.so\r\n  Expected in: flat namespace\r\n in /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astropy/wcs/_wcs.cpython-35m-darwin.so\r\n```\r\n\r\nI ran into this issue because I executed `astropy.test()` which failed because of this issue (and then apparently got stuck in reporting the error, too):\r\n```\r\nIn [2]: astropy.test()\r\n====================================================================== test session starts =======================================================================\r\nplatform darwin -- Python 3.5.1 -- py-1.4.30 -- pytest-2.7.3\r\nrootdir: /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astropy, inifile: \r\n\r\nRunning tests with Astropy version 1.1.1.\r\nRunning tests in /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astropy.\r\n\r\nDate: 2016-01-11T14:32:49\r\n\r\nPlatform: Darwin-15.2.0-x86_64-i386-64bit\r\n\r\nExecutable: /opt/local/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5\r\n\r\nFull Python Version: \r\n3.5.1 (default, Jan 11 2016, 12:45:30) \r\n[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)]\r\n\r\nencodings: sys: utf-8, locale: UTF-8, filesystem: utf-8\r\nbyteorder: little\r\nfloat info: dig: 15, mant_dig: 15\r\n\r\nNumpy: 1.10.4\r\nScipy: 0.16.1\r\nMatplotlib: 1.5.0\r\nh5py: not available\r\nPandas: 0.17.1\r\n\r\ncollected 0 items / 1 errors \r\n\r\n============================================================================= ERRORS =============================================================================\r\n_______________________________________________________________________ ERROR collecting  ________________________________________________________________________\r\n_pytest.runner:149: in __init__\r\n    ???\r\n_pytest.main:437: in _memocollect\r\n    ???\r\n_pytest.main:314: in _memoizedcall\r\n    ???\r\n_pytest.main:437: in <lambda>\r\n    ???\r\n_pytest.main:596: in collect\r\n    ???\r\n_pytest.main:611: in _collect\r\n    ???\r\npy._path.common:332: in visit\r\n    ???\r\npy._path.common:378: in gen\r\n    ???\r\npy._path.common:367: in gen\r\n    ???\r\npy._path.common:368: in <listcomp>\r\n    ???\r\n_pytest.main:634: in _recurse\r\n    ???\r\n_pytest.main:162: in __getattr__\r\n    ???\r\n_pytest.config:695: in _getmatchingplugins\r\n    ???\r\n_pytest.config:524: in getconftestmodules\r\n    ???\r\n_pytest.config:548: in importconftest\r\n    ???\r\nE   _pytest.config.ConftestImportFailure: (local('/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astropy/table/tests/conftest.py'), (<class 'ImportError'>, ImportError('dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astropy/wcs/_wcs.cpython-35m-darwin.so, 2): Symbol not found: _wcslib_version\\n  Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astropy/wcs/_wcs.cpython-35m-darwin.so\\n  Expected in: flat namespace\\n in /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astropy/wcs/_wcs.cpython-35m-darwin.so',), <traceback object at 0x118610c48>))\r\n==================================================================== 1 error in 0.62 seconds =====================================================================\r\nOut[2]: ---------------------------------------------------------------------------\r\nKeyError                                  Traceback (most recent call last)\r\n/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/traitlets/traitlets.py in get(self, obj, cls)\r\n    459         try:\r\n--> 460             value = obj._trait_values[self.name]\r\n    461         except KeyError:\r\n\r\nKeyError: 'ipython_display_formatter'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nDeprecationWarning                        Traceback (most recent call last)\r\n<ipython-input-2-572f3607969c> in <module>()\r\n----> 1 astropy.test()\r\n\r\n/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/IPython/core/displayhook.py in __call__(self, result)\r\n    244             self.start_displayhook()\r\n    245             self.write_output_prompt()\r\n--> 246             format_dict, md_dict = self.compute_format_data(result)\r\n    247             self.update_user_ns(result)\r\n    248             self.fill_exec_result(result)\r\n\r\n/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/IPython/core/displayhook.py in compute_format_data(self, result)\r\n    150 \r\n    151         \"\"\"\r\n--> 152         return self.shell.display_formatter.format(result)\r\n    153 \r\n    154     def write_format_data(self, format_dict, md_dict=None):\r\n\r\n/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/IPython/core/formatters.py in format(self, obj, include, exclude)\r\n    161         md_dict = {}\r\n    162 \r\n--> 163         if self.ipython_display_formatter(obj):\r\n    164             # object handled itself, don't proceed\r\n    165             return {}, {}\r\n\r\n/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/traitlets/traitlets.py in __get__(self, obj, cls)\r\n    486             return self\r\n    487         else:\r\n--> 488             return self.get(obj, cls)\r\n    489 \r\n    490     def set(self, obj, value):\r\n\r\n/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/traitlets/traitlets.py in get(self, obj, cls)\r\n    461         except KeyError:\r\n    462             # Check for a dynamic initializer.\r\n--> 463             dynamic_default = self._dynamic_default_callable(obj)\r\n    464             if dynamic_default is None:\r\n    465                 raise TraitError(\"No default value found for %s trait of %r\"\r\n\r\n/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/traitlets/traitlets.py in _dynamic_default_callable(self, obj)\r\n    440                 if meth_name in cls.__dict__:\r\n    441                     warn(\"_[traitname]_default handlers are deprecated: use default\"\r\n--> 442                          \" decorator instead\", DeprecationWarning, stacklevel=2)\r\n    443                     return getattr(obj, meth_name)\r\n    444 \r\n\r\nDeprecationWarning: _[traitname]_default handlers are deprecated: use default decorator instead\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/astropy/astropy/issues/comments/170553090","html_url":"https://github.com/astropy/astropy/issues/4467#issuecomment-170553090","issue_url":"https://api.github.com/repos/astropy/astropy/issues/4467","id":170553090,"user":{"login":"astroleo","id":12253033,"avatar_url":"https://avatars.githubusercontent.com/u/12253033?v=3","gravatar_id":"","url":"https://api.github.com/users/astroleo","html_url":"https://github.com/astroleo","followers_url":"https://api.github.com/users/astroleo/followers","following_url":"https://api.github.com/users/astroleo/following{/other_user}","gists_url":"https://api.github.com/users/astroleo/gists{/gist_id}","starred_url":"https://api.github.com/users/astroleo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astroleo/subscriptions","organizations_url":"https://api.github.com/users/astroleo/orgs","repos_url":"https://api.github.com/users/astroleo/repos","events_url":"https://api.github.com/users/astroleo/events{/privacy}","received_events_url":"https://api.github.com/users/astroleo/received_events","type":"User","site_admin":false},"created_at":"2016-01-11T13:46:37Z","updated_at":"2016-01-11T13:46:37Z","body":"I don't think this is connected to other recent wcs-related reports (#4460, #4441)"}}