New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Successful Installation of poliastro but the tests failed #35

Closed
OrbitalMechanic opened this Issue Apr 23, 2015 · 12 comments

Comments

3 participants
@OrbitalMechanic

OrbitalMechanic commented Apr 23, 2015

I've successfully installed poliastro on my MacBook Pro running Mac OS X ver. 10.10.3. Now the python environment is Anaconda for Python 2.7. When run the test, python -c "import poliastro; poliastro.test()", I get errors which point to stumpff.py. A copy of my installation log and test output is given below.

Please advise.

users-MacBook-Pro:poliastro user$ python setup.py install
running install
running bdist_egg
running egg_info
creating poliastro.egg-info
writing poliastro.egg-info/PKG-INFO
writing top-level names to poliastro.egg-info/top_level.txt
writing dependency_links to poliastro.egg-info/dependency_links.txt
writing poliastro.egg-info/PKG-INFO
writing top-level names to poliastro.egg-info/top_level.txt
writing dependency_links to poliastro.egg-info/dependency_links.txt
writing manifest file 'poliastro.egg-info/SOURCES.txt'
reading manifest file 'poliastro.egg-info/SOURCES.txt'
writing manifest file 'poliastro.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.5-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/poliastro
copying poliastro/__init__.py -> build/lib/poliastro
copying poliastro/bodies.py -> build/lib/poliastro
copying poliastro/examples.py -> build/lib/poliastro
copying poliastro/iod.py -> build/lib/poliastro
copying poliastro/maneuver.py -> build/lib/poliastro
copying poliastro/plotting.py -> build/lib/poliastro
copying poliastro/stumpff.py -> build/lib/poliastro
copying poliastro/util.py -> build/lib/poliastro
creating build/lib/poliastro/twobody
copying poliastro/twobody/__init__.py -> build/lib/poliastro/twobody
copying poliastro/twobody/conversion.py -> build/lib/poliastro/twobody
copying poliastro/twobody/propagation.py -> build/lib/poliastro/twobody
copying poliastro/twobody/state.py -> build/lib/poliastro/twobody
creating build/lib/poliastro/tests
copying poliastro/tests/__init__.py -> build/lib/poliastro/tests
copying poliastro/tests/test_bodies.py -> build/lib/poliastro/tests
copying poliastro/tests/test_examples.py -> build/lib/poliastro/tests
copying poliastro/tests/test_iod.py -> build/lib/poliastro/tests
copying poliastro/tests/test_maneuver.py -> build/lib/poliastro/tests
copying poliastro/tests/test_plotting.py -> build/lib/poliastro/tests
copying poliastro/tests/test_twobody.py -> build/lib/poliastro/tests
copying poliastro/tests/test_util.py -> build/lib/poliastro/tests
creating build/bdist.macosx-10.5-x86_64
creating build/bdist.macosx-10.5-x86_64/egg
creating build/bdist.macosx-10.5-x86_64/egg/poliastro
copying build/lib/poliastro/__init__.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro
copying build/lib/poliastro/bodies.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro
copying build/lib/poliastro/examples.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro
copying build/lib/poliastro/iod.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro
copying build/lib/poliastro/maneuver.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro
copying build/lib/poliastro/plotting.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro
copying build/lib/poliastro/stumpff.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro
creating build/bdist.macosx-10.5-x86_64/egg/poliastro/tests
copying build/lib/poliastro/tests/__init__.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro/tests
copying build/lib/poliastro/tests/test_bodies.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro/tests
copying build/lib/poliastro/tests/test_examples.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro/tests
copying build/lib/poliastro/tests/test_iod.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro/tests
copying build/lib/poliastro/tests/test_maneuver.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro/tests
copying build/lib/poliastro/tests/test_plotting.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro/tests
copying build/lib/poliastro/tests/test_twobody.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro/tests
copying build/lib/poliastro/tests/test_util.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro/tests
creating build/bdist.macosx-10.5-x86_64/egg/poliastro/twobody
copying build/lib/poliastro/twobody/__init__.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro/twobody
copying build/lib/poliastro/twobody/conversion.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro/twobody
copying build/lib/poliastro/twobody/propagation.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro/twobody
copying build/lib/poliastro/twobody/state.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro/twobody
copying build/lib/poliastro/util.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/__init__.py to __init__.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/bodies.py to bodies.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/examples.py to examples.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/iod.py to iod.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/maneuver.py to maneuver.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/plotting.py to plotting.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/stumpff.py to stumpff.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/tests/__init__.py to __init__.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/tests/test_bodies.py to test_bodies.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/tests/test_examples.py to test_examples.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/tests/test_iod.py to test_iod.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/tests/test_maneuver.py to test_maneuver.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/tests/test_plotting.py to test_plotting.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/tests/test_twobody.py to test_twobody.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/tests/test_util.py to test_util.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/twobody/__init__.py to __init__.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/twobody/conversion.py to conversion.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/twobody/propagation.py to propagation.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/twobody/state.py to state.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/util.py to util.pyc
creating build/bdist.macosx-10.5-x86_64/egg/EGG-INFO
copying poliastro.egg-info/PKG-INFO -> build/bdist.macosx-10.5-x86_64/egg/EGG-INFO
copying poliastro.egg-info/SOURCES.txt -> build/bdist.macosx-10.5-x86_64/egg/EGG-INFO
copying poliastro.egg-info/dependency_links.txt -> build/bdist.macosx-10.5-x86_64/egg/EGG-INFO
copying poliastro.egg-info/top_level.txt -> build/bdist.macosx-10.5-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
poliastro.__init__: module references __file__
creating dist
creating 'dist/poliastro-0.3.0_dev-py2.7.egg' and adding 'build/bdist.macosx-10.5-x86_64/egg' to it
removing 'build/bdist.macosx-10.5-x86_64/egg' (and everything under it)
Processing poliastro-0.3.0_dev-py2.7.egg
creating /Users/user/anaconda/lib/python2.7/site-packages/poliastro-0.3.0_dev-py2.7.egg
Extracting poliastro-0.3.0_dev-py2.7.egg to /Users/user/anaconda/lib/python2.7/site-packages
Adding poliastro 0.3.0-dev to easy-install.pth file
error: [Errno 13] Permission denied: '/Users/user/anaconda/lib/python2.7/site-packages/easy-install.pth'
users-MacBook-Pro:poliastro user$ sudo python setup.py install
Password:
running install
running bdist_egg
running egg_info
writing poliastro.egg-info/PKG-INFO
writing top-level names to poliastro.egg-info/top_level.txt
writing dependency_links to poliastro.egg-info/dependency_links.txt
writing poliastro.egg-info/PKG-INFO
writing top-level names to poliastro.egg-info/top_level.txt
writing dependency_links to poliastro.egg-info/dependency_links.txt
reading manifest file 'poliastro.egg-info/SOURCES.txt'
writing manifest file 'poliastro.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.5-x86_64/egg
running install_lib
running build_py
creating build/bdist.macosx-10.5-x86_64/egg
creating build/bdist.macosx-10.5-x86_64/egg/poliastro
copying build/lib/poliastro/__init__.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro
copying build/lib/poliastro/bodies.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro
copying build/lib/poliastro/examples.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro
copying build/lib/poliastro/iod.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro
copying build/lib/poliastro/maneuver.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro
copying build/lib/poliastro/plotting.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro
copying build/lib/poliastro/stumpff.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro
creating build/bdist.macosx-10.5-x86_64/egg/poliastro/tests
copying build/lib/poliastro/tests/__init__.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro/tests
copying build/lib/poliastro/tests/test_bodies.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro/tests
copying build/lib/poliastro/tests/test_examples.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro/tests
copying build/lib/poliastro/tests/test_iod.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro/tests
copying build/lib/poliastro/tests/test_maneuver.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro/tests
copying build/lib/poliastro/tests/test_plotting.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro/tests
copying build/lib/poliastro/tests/test_twobody.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro/tests
copying build/lib/poliastro/tests/test_util.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro/tests
creating build/bdist.macosx-10.5-x86_64/egg/poliastro/twobody
copying build/lib/poliastro/twobody/__init__.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro/twobody
copying build/lib/poliastro/twobody/conversion.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro/twobody
copying build/lib/poliastro/twobody/propagation.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro/twobody
copying build/lib/poliastro/twobody/state.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro/twobody
copying build/lib/poliastro/util.py -> build/bdist.macosx-10.5-x86_64/egg/poliastro
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/__init__.py to __init__.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/bodies.py to bodies.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/examples.py to examples.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/iod.py to iod.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/maneuver.py to maneuver.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/plotting.py to plotting.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/stumpff.py to stumpff.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/tests/__init__.py to __init__.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/tests/test_bodies.py to test_bodies.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/tests/test_examples.py to test_examples.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/tests/test_iod.py to test_iod.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/tests/test_maneuver.py to test_maneuver.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/tests/test_plotting.py to test_plotting.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/tests/test_twobody.py to test_twobody.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/tests/test_util.py to test_util.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/twobody/__init__.py to __init__.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/twobody/conversion.py to conversion.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/twobody/propagation.py to propagation.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/twobody/state.py to state.pyc
byte-compiling build/bdist.macosx-10.5-x86_64/egg/poliastro/util.py to util.pyc
creating build/bdist.macosx-10.5-x86_64/egg/EGG-INFO
copying poliastro.egg-info/PKG-INFO -> build/bdist.macosx-10.5-x86_64/egg/EGG-INFO
copying poliastro.egg-info/SOURCES.txt -> build/bdist.macosx-10.5-x86_64/egg/EGG-INFO
copying poliastro.egg-info/dependency_links.txt -> build/bdist.macosx-10.5-x86_64/egg/EGG-INFO
copying poliastro.egg-info/top_level.txt -> build/bdist.macosx-10.5-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
poliastro.__init__: module references __file__
creating 'dist/poliastro-0.3.0_dev-py2.7.egg' and adding 'build/bdist.macosx-10.5-x86_64/egg' to it
removing 'build/bdist.macosx-10.5-x86_64/egg' (and everything under it)
Processing poliastro-0.3.0_dev-py2.7.egg
removing '/Users/user/anaconda/lib/python2.7/site-packages/poliastro-0.3.0_dev-py2.7.egg' (and everything under it)
creating /Users/user/anaconda/lib/python2.7/site-packages/poliastro-0.3.0_dev-py2.7.egg
Extracting poliastro-0.3.0_dev-py2.7.egg to /Users/user/anaconda/lib/python2.7/site-packages
Adding poliastro 0.3.0-dev to easy-install.pth file

Installed /Users/user/anaconda/lib/python2.7/site-packages/poliastro-0.3.0_dev-py2.7.egg
Processing dependencies for poliastro==0.3.0-dev
Finished processing dependencies for poliastro==0.3.0-dev
users-MacBook-Pro:poliastro user$ python -c "import poliastro; poliastro.test()"
=================================================================== test session starts ===================================================================
platform darwin -- Python 2.7.9 -- py-1.4.26 -- pytest-2.6.4
collected 7 items / 5 errors 

poliastro/tests/test_bodies.py ....
poliastro/tests/test_util.py ...

========================================================================= ERRORS ==========================================================================
____________________________________________________ ERROR collecting poliastro/tests/test_examples.py ____________________________________________________
poliastro/tests/test_examples.py:4: in <module>
    from poliastro import examples
poliastro/examples.py:10: in <module>
    from poliastro.twobody import State
poliastro/twobody/__init__.py:3: in <module>
    from poliastro.twobody.state import State
poliastro/twobody/state.py:16: in <module>
    from poliastro.twobody.propagation import kepler
poliastro/twobody/propagation.py:10: in <module>
    from poliastro.stumpff import c2, c3
poliastro/stumpff.py:10: in <module>
    @numba.jit('f8(f8)', nopython=True)
../anaconda/lib/python2.7/site-packages/numba/decorators.py:171: in wrapper
    disp.compile(sig)
../anaconda/lib/python2.7/site-packages/numba/dispatcher.py:277: in compile
    flags=flags, locals=self.locals)
../anaconda/lib/python2.7/site-packages/numba/compiler.py:547: in compile_extra
    return pipeline.compile_extra(func)
../anaconda/lib/python2.7/site-packages/numba/compiler.py:293: in compile_extra
    return self.compile_bytecode(bc, func_attr=self.func_attr)
../anaconda/lib/python2.7/site-packages/numba/compiler.py:301: in compile_bytecode
    return self._compile_bytecode()
../anaconda/lib/python2.7/site-packages/numba/compiler.py:534: in _compile_bytecode
    return pm.run(self.status)
../anaconda/lib/python2.7/site-packages/numba/compiler.py:191: in run
    raise patched_exception
E   TypingError: Failed at nopython (nopython frontend)
E   Untyped global name 'gamma'
E   File "poliastro/stumpff.py", line 19
______________________________________________________ ERROR collecting poliastro/tests/test_iod.py _______________________________________________________
poliastro/tests/test_iod.py:8: in <module>
    from poliastro.iod import lambert
poliastro/iod.py:9: in <module>
    from poliastro.stumpff import c2, c3
poliastro/stumpff.py:10: in <module>
    @numba.jit('f8(f8)', nopython=True)
../anaconda/lib/python2.7/site-packages/numba/decorators.py:171: in wrapper
    disp.compile(sig)
../anaconda/lib/python2.7/site-packages/numba/dispatcher.py:277: in compile
    flags=flags, locals=self.locals)
../anaconda/lib/python2.7/site-packages/numba/compiler.py:547: in compile_extra
    return pipeline.compile_extra(func)
../anaconda/lib/python2.7/site-packages/numba/compiler.py:293: in compile_extra
    return self.compile_bytecode(bc, func_attr=self.func_attr)
../anaconda/lib/python2.7/site-packages/numba/compiler.py:301: in compile_bytecode
    return self._compile_bytecode()
../anaconda/lib/python2.7/site-packages/numba/compiler.py:534: in _compile_bytecode
    return pm.run(self.status)
../anaconda/lib/python2.7/site-packages/numba/compiler.py:191: in run
    raise patched_exception
E   TypingError: Failed at nopython (nopython frontend)
E   Untyped global name 'gamma'
E   File "poliastro/stumpff.py", line 19
____________________________________________________ ERROR collecting poliastro/tests/test_maneuver.py ____________________________________________________
poliastro/tests/test_maneuver.py:11: in <module>
    from poliastro.twobody import State
poliastro/twobody/__init__.py:3: in <module>
    from poliastro.twobody.state import State
poliastro/twobody/state.py:16: in <module>
    from poliastro.twobody.propagation import kepler
poliastro/twobody/propagation.py:10: in <module>
    from poliastro.stumpff import c2, c3
poliastro/stumpff.py:10: in <module>
    @numba.jit('f8(f8)', nopython=True)
../anaconda/lib/python2.7/site-packages/numba/decorators.py:171: in wrapper
    disp.compile(sig)
../anaconda/lib/python2.7/site-packages/numba/dispatcher.py:277: in compile
    flags=flags, locals=self.locals)
../anaconda/lib/python2.7/site-packages/numba/compiler.py:547: in compile_extra
    return pipeline.compile_extra(func)
../anaconda/lib/python2.7/site-packages/numba/compiler.py:293: in compile_extra
    return self.compile_bytecode(bc, func_attr=self.func_attr)
../anaconda/lib/python2.7/site-packages/numba/compiler.py:301: in compile_bytecode
    return self._compile_bytecode()
../anaconda/lib/python2.7/site-packages/numba/compiler.py:534: in _compile_bytecode
    return pm.run(self.status)
../anaconda/lib/python2.7/site-packages/numba/compiler.py:191: in run
    raise patched_exception
E   TypingError: Failed at nopython (nopython frontend)
E   Untyped global name 'gamma'
E   File "poliastro/stumpff.py", line 19
____________________________________________________ ERROR collecting poliastro/tests/test_plotting.py ____________________________________________________
poliastro/tests/test_plotting.py:9: in <module>
    from poliastro import plotting
poliastro/plotting.py:13: in <module>
    from poliastro.twobody.conversion import rv_pqw
poliastro/twobody/__init__.py:3: in <module>
    from poliastro.twobody.state import State
poliastro/twobody/state.py:16: in <module>
    from poliastro.twobody.propagation import kepler
poliastro/twobody/propagation.py:10: in <module>
    from poliastro.stumpff import c2, c3
poliastro/stumpff.py:10: in <module>
    @numba.jit('f8(f8)', nopython=True)
../anaconda/lib/python2.7/site-packages/numba/decorators.py:171: in wrapper
    disp.compile(sig)
../anaconda/lib/python2.7/site-packages/numba/dispatcher.py:277: in compile
    flags=flags, locals=self.locals)
../anaconda/lib/python2.7/site-packages/numba/compiler.py:547: in compile_extra
    return pipeline.compile_extra(func)
../anaconda/lib/python2.7/site-packages/numba/compiler.py:293: in compile_extra
    return self.compile_bytecode(bc, func_attr=self.func_attr)
../anaconda/lib/python2.7/site-packages/numba/compiler.py:301: in compile_bytecode
    return self._compile_bytecode()
../anaconda/lib/python2.7/site-packages/numba/compiler.py:534: in _compile_bytecode
    return pm.run(self.status)
../anaconda/lib/python2.7/site-packages/numba/compiler.py:191: in run
    raise patched_exception
E   TypingError: Failed at nopython (nopython frontend)
E   Untyped global name 'gamma'
E   File "poliastro/stumpff.py", line 19
____________________________________________________ ERROR collecting poliastro/tests/test_twobody.py _____________________________________________________
poliastro/tests/test_twobody.py:10: in <module>
    from poliastro.twobody import State
poliastro/twobody/__init__.py:3: in <module>
    from poliastro.twobody.state import State
poliastro/twobody/state.py:16: in <module>
    from poliastro.twobody.propagation import kepler
poliastro/twobody/propagation.py:10: in <module>
    from poliastro.stumpff import c2, c3
poliastro/stumpff.py:10: in <module>
    @numba.jit('f8(f8)', nopython=True)
../anaconda/lib/python2.7/site-packages/numba/decorators.py:171: in wrapper
    disp.compile(sig)
../anaconda/lib/python2.7/site-packages/numba/dispatcher.py:277: in compile
    flags=flags, locals=self.locals)
../anaconda/lib/python2.7/site-packages/numba/compiler.py:547: in compile_extra
    return pipeline.compile_extra(func)
../anaconda/lib/python2.7/site-packages/numba/compiler.py:293: in compile_extra
    return self.compile_bytecode(bc, func_attr=self.func_attr)
../anaconda/lib/python2.7/site-packages/numba/compiler.py:301: in compile_bytecode
    return self._compile_bytecode()
../anaconda/lib/python2.7/site-packages/numba/compiler.py:534: in _compile_bytecode
    return pm.run(self.status)
../anaconda/lib/python2.7/site-packages/numba/compiler.py:191: in run
    raise patched_exception
E   TypingError: Failed at nopython (nopython frontend)
E   Untyped global name 'gamma'
E   File "poliastro/stumpff.py", line 19
=========================================================== 7 passed, 5 error in 26.22 seconds ============================================================
users-MacBook-Pro:poliastro user$ 
@OrbitalMechanic

This comment has been minimized.

OrbitalMechanic commented Apr 23, 2015

I uninstalled the version of poliastro I installed using Git and reinstalled using pip. The bottom line is 6 tests failed and 27 passed. What am I doing wrong? The output from the uninstall, the reinstall and the test are below.

Please advise.

users-MacBook-Pro:~ user$ sudo pip uninstall poliastro
Password:
The directory '/Users/user/Library/Logs/pip' or its parent directory is not owned by the current user and the debug log has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/user/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/user/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Uninstalling poliastro-0.3.0.dev0:
  /Users/user/anaconda/lib/python2.7/site-packages/poliastro-0.3.0_dev-py2.7.egg
Proceed (y/n)? y
  Successfully uninstalled poliastro-0.3.0.dev0
users-MacBook-Pro:~ user$ pip install poliastro
Collecting poliastro
  Downloading poliastro-0.2.0.tar.gz (84kB)
    100% |████████████████████████████████| 86kB 1.3MB/s 
Installing collected packages: poliastro
  Running setup.py install for poliastro
Successfully installed poliastro-0.2.0
users-MacBook-Pro:~ user$ python -c "import poliastro; poliastro.test()"
==================================================================== test session starts ====================================================================
platform darwin -- Python 2.7.9 -- py-1.4.26 -- pytest-2.6.4
collected 32 items 

anaconda/lib/python2.7/site-packages/poliastro/tests/test_bodies.py ....
anaconda/lib/python2.7/site-packages/poliastro/tests/test_maneuver.py ..F.FF
anaconda/lib/python2.7/site-packages/poliastro/tests/test_plotting.py ..
anaconda/lib/python2.7/site-packages/poliastro/tests/test_twobody.py .........F..F....
anaconda/lib/python2.7/site-packages/poliastro/tests/test_util.py .F.

========================================================================= FAILURES ==========================================================================
_________________________________________________________________ test_maneuver_total_time __________________________________________________________________

    def test_maneuver_total_time():
        dt1 = 10.0 * u.s
        dt2 = 100.0 * u.s
        _v = np.zeros(3) * u.km / u.s  # Unused velocity
        expected_total_time = 110.0 * u.s
        man = Maneuver((dt1, _v), (dt2, _v))
>       assert_almost_equal(man.get_total_time(), expected_total_time)

anaconda/lib/python2.7/site-packages/poliastro/tests/test_maneuver.py:42: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
anaconda/lib/python2.7/site-packages/numpy/testing/utils.py:474: in assert_almost_equal
    return assert_array_almost_equal(actual, desired, decimal, err_msg)
anaconda/lib/python2.7/site-packages/numpy/testing/utils.py:842: in assert_array_almost_equal
    precision=decimal)
anaconda/lib/python2.7/site-packages/numpy/testing/utils.py:646: in assert_array_compare
    val = comparison(x, y)
anaconda/lib/python2.7/site-packages/numpy/testing/utils.py:838: in compare
    return around(z, decimal) <= 10.0**(-decimal)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Quantity 0.0 s>, obj = array(False, dtype=bool), context = (<ufunc 'less_equal'>, (<Quantity 0.0 s>, 1e-07), 0)

    def __array_prepare__(self, obj, context=None):
        # This method gets called by Numpy whenever a ufunc is called on the
        # array. The object passed in ``obj`` is an empty version of the
        # output array which we can e.g. change to an array sub-class, add
        # attributes to, etc. After this is called, then the ufunc is called
        # and the values in this empty array are set.

        # If no context is set, just return the input
        if context is None:
            return obj

        # Find out which ufunc is being used
        function = context[0]

        from .quantity_helper import UNSUPPORTED_UFUNCS, UFUNC_HELPERS

        # Check whether we even support this ufunc
        if function in UNSUPPORTED_UFUNCS:
            raise TypeError("Cannot use function '{0}' with quantities"
                            .format(function.__name__))

        # Now find out what arguments were passed to the ufunc, usually, this
        # will include at least the present object, and another, which could
        # be a Quantity, or a Numpy array, etc. when using two-argument ufuncs.
        args = context[1][:function.nin]
        units = [getattr(arg, 'unit', None) for arg in args]

        # If the ufunc is supported, then we call a helper function (defined
        # in quantity_helper.py) which returns the scale by which the inputs
        # should be multiplied before being passed to the ufunc, as well as
        # the unit the output from the ufunc will have.
        if function in UFUNC_HELPERS:
            converters, result_unit = UFUNC_HELPERS[function](function, *units)
        else:
            raise TypeError("Unknown ufunc {0}.  Please raise issue on "
                            "https://github.com/astropy/astropy"
                            .format(function.__name__))

        if any(converter is False for converter in converters):
            # for two-argument ufuncs with a quantity and a non-quantity,
            # the quantity normally needs to be dimensionless, *except*
            # if the non-quantity can have arbitrary unit, i.e., when it
            # is all zero, infinity or NaN.  In that case, the non-quantity
            # can just have the unit of the quantity
            # (this allows, e.g., `q > 0.` independent of unit)
            maybe_arbitrary_arg = args[converters.index(False)]
            try:
                if _can_have_arbitrary_unit(maybe_arbitrary_arg):
                    converters = [None, None]
                else:
                    raise UnitsError("Can only apply '{0}' function to "
                                     "dimensionless quantities when other "
                                     "argument is not a quantity (unless the "
                                     "latter is all zero/infinity/nan)"
>                                    .format(function.__name__))
E                                    UnitsError: Can only apply 'less_equal' function to dimensionless quantities when other argument is not a quantity (unless the latter is all zero/infinity/nan)

anaconda/lib/python2.7/site-packages/astropy/units/quantity.py:317: UnitsError
___________________________________________________________________ test_hohmann_maneuver ___________________________________________________________________

    def test_hohmann_maneuver():
        # Data from Vallado, example 6.1
        alt_i = 191.34411 * u.km
        alt_f = 35781.34857 * u.km
        ss_i = State.circular(Earth, alt_i)
        expected_dv = 3.935224 * u.km / u.s
        expected_t_trans = 5.256713 * u.h
        man = Maneuver.hohmann(ss_i, Earth.R + alt_f)
        assert_almost_equal(ss_i.apply_maneuver(man).ecc, 0)
        assert_almost_equal(man.get_total_cost().to(u.km / u.s), expected_dv,
>                           decimal=5)

anaconda/lib/python2.7/site-packages/poliastro/tests/test_maneuver.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
anaconda/lib/python2.7/site-packages/numpy/testing/utils.py:474: in assert_almost_equal
    return assert_array_almost_equal(actual, desired, decimal, err_msg)
anaconda/lib/python2.7/site-packages/numpy/testing/utils.py:842: in assert_array_almost_equal
    precision=decimal)
anaconda/lib/python2.7/site-packages/numpy/testing/utils.py:646: in assert_array_compare
    val = comparison(x, y)
anaconda/lib/python2.7/site-packages/numpy/testing/utils.py:838: in compare
    return around(z, decimal) <= 10.0**(-decimal)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Quantity 0.0 km / s>, obj = array(False, dtype=bool), context = (<ufunc 'less_equal'>, (<Quantity 0.0 km / s>, 1e-05), 0)

    def __array_prepare__(self, obj, context=None):
        # This method gets called by Numpy whenever a ufunc is called on the
        # array. The object passed in ``obj`` is an empty version of the
        # output array which we can e.g. change to an array sub-class, add
        # attributes to, etc. After this is called, then the ufunc is called
        # and the values in this empty array are set.

        # If no context is set, just return the input
        if context is None:
            return obj

        # Find out which ufunc is being used
        function = context[0]

        from .quantity_helper import UNSUPPORTED_UFUNCS, UFUNC_HELPERS

        # Check whether we even support this ufunc
        if function in UNSUPPORTED_UFUNCS:
            raise TypeError("Cannot use function '{0}' with quantities"
                            .format(function.__name__))

        # Now find out what arguments were passed to the ufunc, usually, this
        # will include at least the present object, and another, which could
        # be a Quantity, or a Numpy array, etc. when using two-argument ufuncs.
        args = context[1][:function.nin]
        units = [getattr(arg, 'unit', None) for arg in args]

        # If the ufunc is supported, then we call a helper function (defined
        # in quantity_helper.py) which returns the scale by which the inputs
        # should be multiplied before being passed to the ufunc, as well as
        # the unit the output from the ufunc will have.
        if function in UFUNC_HELPERS:
            converters, result_unit = UFUNC_HELPERS[function](function, *units)
        else:
            raise TypeError("Unknown ufunc {0}.  Please raise issue on "
                            "https://github.com/astropy/astropy"
                            .format(function.__name__))

        if any(converter is False for converter in converters):
            # for two-argument ufuncs with a quantity and a non-quantity,
            # the quantity normally needs to be dimensionless, *except*
            # if the non-quantity can have arbitrary unit, i.e., when it
            # is all zero, infinity or NaN.  In that case, the non-quantity
            # can just have the unit of the quantity
            # (this allows, e.g., `q > 0.` independent of unit)
            maybe_arbitrary_arg = args[converters.index(False)]
            try:
                if _can_have_arbitrary_unit(maybe_arbitrary_arg):
                    converters = [None, None]
                else:
                    raise UnitsError("Can only apply '{0}' function to "
                                     "dimensionless quantities when other "
                                     "argument is not a quantity (unless the "
                                     "latter is all zero/infinity/nan)"
>                                    .format(function.__name__))
E                                    UnitsError: Can only apply 'less_equal' function to dimensionless quantities when other argument is not a quantity (unless the latter is all zero/infinity/nan)

anaconda/lib/python2.7/site-packages/astropy/units/quantity.py:317: UnitsError
_________________________________________________________________ test_bielliptic_maneuver __________________________________________________________________

    def test_bielliptic_maneuver():
        # Data from Vallado, example 6.2
        alt_i = 191.34411 * u.km
        alt_b = 503873.0 * u.km
        alt_f = 376310.0 * u.km
        ss_i = State.circular(Earth, alt_i)
        expected_dv = 3.904057 * u.km / u.s
        expected_t_trans = 593.919803 * u.h
        man = Maneuver.bielliptic(ss_i, Earth.R + alt_b, Earth.R + alt_f)
        assert_almost_equal(ss_i.apply_maneuver(man).ecc, 0)
        assert_almost_equal(man.get_total_cost().to(u.km / u.s), expected_dv,
>                           decimal=5)

anaconda/lib/python2.7/site-packages/poliastro/tests/test_maneuver.py:77: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
anaconda/lib/python2.7/site-packages/numpy/testing/utils.py:474: in assert_almost_equal
    return assert_array_almost_equal(actual, desired, decimal, err_msg)
anaconda/lib/python2.7/site-packages/numpy/testing/utils.py:842: in assert_array_almost_equal
    precision=decimal)
anaconda/lib/python2.7/site-packages/numpy/testing/utils.py:646: in assert_array_compare
    val = comparison(x, y)
anaconda/lib/python2.7/site-packages/numpy/testing/utils.py:838: in compare
    return around(z, decimal) <= 10.0**(-decimal)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Quantity 0.0 km / s>, obj = array(False, dtype=bool), context = (<ufunc 'less_equal'>, (<Quantity 0.0 km / s>, 1e-05), 0)

    def __array_prepare__(self, obj, context=None):
        # This method gets called by Numpy whenever a ufunc is called on the
        # array. The object passed in ``obj`` is an empty version of the
        # output array which we can e.g. change to an array sub-class, add
        # attributes to, etc. After this is called, then the ufunc is called
        # and the values in this empty array are set.

        # If no context is set, just return the input
        if context is None:
            return obj

        # Find out which ufunc is being used
        function = context[0]

        from .quantity_helper import UNSUPPORTED_UFUNCS, UFUNC_HELPERS

        # Check whether we even support this ufunc
        if function in UNSUPPORTED_UFUNCS:
            raise TypeError("Cannot use function '{0}' with quantities"
                            .format(function.__name__))

        # Now find out what arguments were passed to the ufunc, usually, this
        # will include at least the present object, and another, which could
        # be a Quantity, or a Numpy array, etc. when using two-argument ufuncs.
        args = context[1][:function.nin]
        units = [getattr(arg, 'unit', None) for arg in args]

        # If the ufunc is supported, then we call a helper function (defined
        # in quantity_helper.py) which returns the scale by which the inputs
        # should be multiplied before being passed to the ufunc, as well as
        # the unit the output from the ufunc will have.
        if function in UFUNC_HELPERS:
            converters, result_unit = UFUNC_HELPERS[function](function, *units)
        else:
            raise TypeError("Unknown ufunc {0}.  Please raise issue on "
                            "https://github.com/astropy/astropy"
                            .format(function.__name__))

        if any(converter is False for converter in converters):
            # for two-argument ufuncs with a quantity and a non-quantity,
            # the quantity normally needs to be dimensionless, *except*
            # if the non-quantity can have arbitrary unit, i.e., when it
            # is all zero, infinity or NaN.  In that case, the non-quantity
            # can just have the unit of the quantity
            # (this allows, e.g., `q > 0.` independent of unit)
            maybe_arbitrary_arg = args[converters.index(False)]
            try:
                if _can_have_arbitrary_unit(maybe_arbitrary_arg):
                    converters = [None, None]
                else:
                    raise UnitsError("Can only apply '{0}' function to "
                                     "dimensionless quantities when other "
                                     "argument is not a quantity (unless the "
                                     "latter is all zero/infinity/nan)"
>                                    .format(function.__name__))
E                                    UnitsError: Can only apply 'less_equal' function to dimensionless quantities when other argument is not a quantity (unless the latter is all zero/infinity/nan)

anaconda/lib/python2.7/site-packages/astropy/units/quantity.py:317: UnitsError
__________________________________________________________________ test_perigee_and_apogee __________________________________________________________________

    def test_perigee_and_apogee():
        expected_r_a = 500 * u.km
        expected_r_p = 300 * u.km
        a = (expected_r_a + expected_r_p) / 2
        ecc = expected_r_a / a - 1
        _a = 1.0 * u.deg  # Unused angle
        ss = State.from_elements(Earth, a, ecc, _a, _a, _a, _a)
>       assert_almost_equal(ss.r_a, expected_r_a)

anaconda/lib/python2.7/site-packages/poliastro/tests/test_twobody.py:107: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
anaconda/lib/python2.7/site-packages/numpy/testing/utils.py:474: in assert_almost_equal
    return assert_array_almost_equal(actual, desired, decimal, err_msg)
anaconda/lib/python2.7/site-packages/numpy/testing/utils.py:842: in assert_array_almost_equal
    precision=decimal)
anaconda/lib/python2.7/site-packages/numpy/testing/utils.py:646: in assert_array_compare
    val = comparison(x, y)
anaconda/lib/python2.7/site-packages/numpy/testing/utils.py:838: in compare
    return around(z, decimal) <= 10.0**(-decimal)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Quantity 0.0 km>, obj = array(False, dtype=bool), context = (<ufunc 'less_equal'>, (<Quantity 0.0 km>, 1e-07), 0)

    def __array_prepare__(self, obj, context=None):
        # This method gets called by Numpy whenever a ufunc is called on the
        # array. The object passed in ``obj`` is an empty version of the
        # output array which we can e.g. change to an array sub-class, add
        # attributes to, etc. After this is called, then the ufunc is called
        # and the values in this empty array are set.

        # If no context is set, just return the input
        if context is None:
            return obj

        # Find out which ufunc is being used
        function = context[0]

        from .quantity_helper import UNSUPPORTED_UFUNCS, UFUNC_HELPERS

        # Check whether we even support this ufunc
        if function in UNSUPPORTED_UFUNCS:
            raise TypeError("Cannot use function '{0}' with quantities"
                            .format(function.__name__))

        # Now find out what arguments were passed to the ufunc, usually, this
        # will include at least the present object, and another, which could
        # be a Quantity, or a Numpy array, etc. when using two-argument ufuncs.
        args = context[1][:function.nin]
        units = [getattr(arg, 'unit', None) for arg in args]

        # If the ufunc is supported, then we call a helper function (defined
        # in quantity_helper.py) which returns the scale by which the inputs
        # should be multiplied before being passed to the ufunc, as well as
        # the unit the output from the ufunc will have.
        if function in UFUNC_HELPERS:
            converters, result_unit = UFUNC_HELPERS[function](function, *units)
        else:
            raise TypeError("Unknown ufunc {0}.  Please raise issue on "
                            "https://github.com/astropy/astropy"
                            .format(function.__name__))

        if any(converter is False for converter in converters):
            # for two-argument ufuncs with a quantity and a non-quantity,
            # the quantity normally needs to be dimensionless, *except*
            # if the non-quantity can have arbitrary unit, i.e., when it
            # is all zero, infinity or NaN.  In that case, the non-quantity
            # can just have the unit of the quantity
            # (this allows, e.g., `q > 0.` independent of unit)
            maybe_arbitrary_arg = args[converters.index(False)]
            try:
                if _can_have_arbitrary_unit(maybe_arbitrary_arg):
                    converters = [None, None]
                else:
                    raise UnitsError("Can only apply '{0}' function to "
                                     "dimensionless quantities when other "
                                     "argument is not a quantity (unless the "
                                     "latter is all zero/infinity/nan)"
>                                    .format(function.__name__))
E                                    UnitsError: Can only apply 'less_equal' function to dimensionless quantities when other argument is not a quantity (unless the latter is all zero/infinity/nan)

anaconda/lib/python2.7/site-packages/astropy/units/quantity.py:317: UnitsError
_______________________________________________________ test_apply_zero_maneuver_returns_equal_state ________________________________________________________

    def test_apply_zero_maneuver_returns_equal_state():
        _d = 1.0 * u.AU  # Unused distance
        _ = 0.5 * u.one  # Unused dimensionless value
        _a = 1.0 * u.deg  # Unused angle
        ss = State.from_elements(Sun, _d, _, _a, _a, _a, _a)
        dt = 0 * u.s
        dv = [0, 0, 0] * u.km / u.s
        ss_new = ss.apply_maneuver([(dt, dv)])
>       assert_almost_equal(ss_new.r.to(u.km), ss.r.to(u.km))

anaconda/lib/python2.7/site-packages/poliastro/tests/test_twobody.py:152: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
anaconda/lib/python2.7/site-packages/numpy/testing/utils.py:474: in assert_almost_equal
    return assert_array_almost_equal(actual, desired, decimal, err_msg)
anaconda/lib/python2.7/site-packages/numpy/testing/utils.py:842: in assert_array_almost_equal
    precision=decimal)
anaconda/lib/python2.7/site-packages/numpy/testing/utils.py:646: in assert_array_compare
    val = comparison(x, y)
anaconda/lib/python2.7/site-packages/numpy/testing/utils.py:838: in compare
    return around(z, decimal) <= 10.0**(-decimal)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Quantity [ 0., 0., 0.] km>, obj = array([False, False, False], dtype=bool), context = (<ufunc 'less_equal'>, (<Quantity [ 0., 0., 0.] km>, 1e-07), 0)

    def __array_prepare__(self, obj, context=None):
        # This method gets called by Numpy whenever a ufunc is called on the
        # array. The object passed in ``obj`` is an empty version of the
        # output array which we can e.g. change to an array sub-class, add
        # attributes to, etc. After this is called, then the ufunc is called
        # and the values in this empty array are set.

        # If no context is set, just return the input
        if context is None:
            return obj

        # Find out which ufunc is being used
        function = context[0]

        from .quantity_helper import UNSUPPORTED_UFUNCS, UFUNC_HELPERS

        # Check whether we even support this ufunc
        if function in UNSUPPORTED_UFUNCS:
            raise TypeError("Cannot use function '{0}' with quantities"
                            .format(function.__name__))

        # Now find out what arguments were passed to the ufunc, usually, this
        # will include at least the present object, and another, which could
        # be a Quantity, or a Numpy array, etc. when using two-argument ufuncs.
        args = context[1][:function.nin]
        units = [getattr(arg, 'unit', None) for arg in args]

        # If the ufunc is supported, then we call a helper function (defined
        # in quantity_helper.py) which returns the scale by which the inputs
        # should be multiplied before being passed to the ufunc, as well as
        # the unit the output from the ufunc will have.
        if function in UFUNC_HELPERS:
            converters, result_unit = UFUNC_HELPERS[function](function, *units)
        else:
            raise TypeError("Unknown ufunc {0}.  Please raise issue on "
                            "https://github.com/astropy/astropy"
                            .format(function.__name__))

        if any(converter is False for converter in converters):
            # for two-argument ufuncs with a quantity and a non-quantity,
            # the quantity normally needs to be dimensionless, *except*
            # if the non-quantity can have arbitrary unit, i.e., when it
            # is all zero, infinity or NaN.  In that case, the non-quantity
            # can just have the unit of the quantity
            # (this allows, e.g., `q > 0.` independent of unit)
            maybe_arbitrary_arg = args[converters.index(False)]
            try:
                if _can_have_arbitrary_unit(maybe_arbitrary_arg):
                    converters = [None, None]
                else:
                    raise UnitsError("Can only apply '{0}' function to "
                                     "dimensionless quantities when other "
                                     "argument is not a quantity (unless the "
                                     "latter is all zero/infinity/nan)"
>                                    .format(function.__name__))
E                                    UnitsError: Can only apply 'less_equal' function to dimensionless quantities when other argument is not a quantity (unless the latter is all zero/infinity/nan)

anaconda/lib/python2.7/site-packages/astropy/units/quantity.py:317: UnitsError
_______________________________________________________________ test_rotate_vector_with_units _______________________________________________________________

    def test_rotate_vector_with_units():
        vector = [1, 0, 0] * u.m
        angle = 90 * u.deg
        axis = 'y'
        expected_vector = [0, 0, -1] * u.m
        result = util.rotate(vector, angle, axis)
>       assert_array_almost_equal(result, expected_vector)

anaconda/lib/python2.7/site-packages/poliastro/tests/test_util.py:25: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
anaconda/lib/python2.7/site-packages/numpy/testing/utils.py:842: in assert_array_almost_equal
    precision=decimal)
anaconda/lib/python2.7/site-packages/numpy/testing/utils.py:646: in assert_array_compare
    val = comparison(x, y)
anaconda/lib/python2.7/site-packages/numpy/testing/utils.py:838: in compare
    return around(z, decimal) <= 10.0**(-decimal)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Quantity [ 0., 0., 0.] m>, obj = array([False, False, False], dtype=bool), context = (<ufunc 'less_equal'>, (<Quantity [ 0., 0., 0.] m>, 1e-06), 0)

    def __array_prepare__(self, obj, context=None):
        # This method gets called by Numpy whenever a ufunc is called on the
        # array. The object passed in ``obj`` is an empty version of the
        # output array which we can e.g. change to an array sub-class, add
        # attributes to, etc. After this is called, then the ufunc is called
        # and the values in this empty array are set.

        # If no context is set, just return the input
        if context is None:
            return obj

        # Find out which ufunc is being used
        function = context[0]

        from .quantity_helper import UNSUPPORTED_UFUNCS, UFUNC_HELPERS

        # Check whether we even support this ufunc
        if function in UNSUPPORTED_UFUNCS:
            raise TypeError("Cannot use function '{0}' with quantities"
                            .format(function.__name__))

        # Now find out what arguments were passed to the ufunc, usually, this
        # will include at least the present object, and another, which could
        # be a Quantity, or a Numpy array, etc. when using two-argument ufuncs.
        args = context[1][:function.nin]
        units = [getattr(arg, 'unit', None) for arg in args]

        # If the ufunc is supported, then we call a helper function (defined
        # in quantity_helper.py) which returns the scale by which the inputs
        # should be multiplied before being passed to the ufunc, as well as
        # the unit the output from the ufunc will have.
        if function in UFUNC_HELPERS:
            converters, result_unit = UFUNC_HELPERS[function](function, *units)
        else:
            raise TypeError("Unknown ufunc {0}.  Please raise issue on "
                            "https://github.com/astropy/astropy"
                            .format(function.__name__))

        if any(converter is False for converter in converters):
            # for two-argument ufuncs with a quantity and a non-quantity,
            # the quantity normally needs to be dimensionless, *except*
            # if the non-quantity can have arbitrary unit, i.e., when it
            # is all zero, infinity or NaN.  In that case, the non-quantity
            # can just have the unit of the quantity
            # (this allows, e.g., `q > 0.` independent of unit)
            maybe_arbitrary_arg = args[converters.index(False)]
            try:
                if _can_have_arbitrary_unit(maybe_arbitrary_arg):
                    converters = [None, None]
                else:
                    raise UnitsError("Can only apply '{0}' function to "
                                     "dimensionless quantities when other "
                                     "argument is not a quantity (unless the "
                                     "latter is all zero/infinity/nan)"
>                                    .format(function.__name__))
E                                    UnitsError: Can only apply 'less_equal' function to dimensionless quantities when other argument is not a quantity (unless the latter is all zero/infinity/nan)

anaconda/lib/python2.7/site-packages/astropy/units/quantity.py:317: UnitsError
============================================================ 6 failed, 26 passed in 8.54 seconds ============================================================
users-MacBook-Pro:~ user$ 
@Juanlu001

This comment has been minimized.

Member

Juanlu001 commented Apr 23, 2015

Hello @OrbitalMechanic, did you close the issue because you managed to make the tests pass? If so, do you know what was the problem?

@OrbitalMechanic

This comment has been minimized.

OrbitalMechanic commented Apr 24, 2015

If it was closed it was purely by accident. I haven't discovered the
reason for the failures. Please reopen the issue.

Sam Dupree.

On 04/23/2015 00:39:45, Juan Luis Cano Rodríguez wrote:

Hello @OrbitalMechanic https://github.com/OrbitalMechanic, did you
close the issue because you managed to make the test pass? If so, do
you know what was the problem?


Reply to this email directly or view it on GitHub
#35 (comment).

@Juanlu001 Juanlu001 reopened this Apr 24, 2015

@Juanlu001

This comment has been minimized.

Member

Juanlu001 commented Apr 24, 2015

Thanks @OrbitalMechanic, I changed the formatting of your last comment to properly see the result (you can use triple backticks ``` for that). Can you tell me how did you download poliastro and which astropy version do you have?

If I understood correctly, you manage your Python packages through Anaconda and the root environment is installed in a location which needs super admin privileges, am I right? Perhaps you can try to create a conda environment to make testing easier:

$ conda create -n poliastro27 python=2.7 numpy astropy matplotlib numba
$ source activate poliastro27
$ cd poliastro
$ python setup.py install
@OrbitalMechanic

This comment has been minimized.

OrbitalMechanic commented Apr 24, 2015

Initially I used GitHub to clone a version of the source to my system
and installed it per the following commands:

$ git clone https://github.com/Pybonacci/poliastro.git
$ cd poliastro/
$ python setup.py install

Not happy with the results I got from running the tests, I uninstalled
poliastro using the command "pip uninstall poliastro" and when realizing
that the preferred method of installing poliastro was to use pip, I
reinstalled poliastro using the command "pip install poliastro".

After looking at the installation procedures under "Getting Started" is
there a difference in just using "pip install poliastro" as opposed to
using "pip install numpy astropy matplotlib poliastro" as cite on the
webpage, even though I have numpy, astropy and matplotlib already installed?

On 04/24/2015 04:57:12, Juan Luis Cano Rodríguez wrote:

Thanks @OrbitalMechanic https://github.com/OrbitalMechanic, I
changed the formatting of your last comment to properly see the result
(you can use triple backticks ``` for that). Can you tell me how did
you download poliastro and which astropy version do you have?

If I understood correctly, you manage your Python packages through
Anaconda and the root environment is installed in a location which
needs super admin privileges, am I right? Perhaps you can try to
create a conda environment to make testing easier:

|$ conda create -n poliastro27 python=2.7 numpy astropy matplotlib numba
$ source activate poliastro27
$ cd poliastro
$ python setup.py install
|


Reply to this email directly or view it on GitHub
#35 (comment).

@Juanlu001

This comment has been minimized.

Member

Juanlu001 commented Apr 24, 2015

While there is no difference between installing poliastro with all the
requirements explicitely or not when using pip, this will install the
stable version available in PyPI which is 2.0 and has some differences with
the one from GitHub.

The first time you had many tests failing probably because of an old numba
version. It only works with the latest one, which is 0.18.2 if I recall
correctly.

The second time the tests failed because of a change in recent versions of
astropy that I had not tested with poliastro 2.0. I will therefore release
a 2.0.1 installable with pip without these problems.

Thanks for the bug report!
On Apr 24, 2015 3:29 PM, "OrbitalMechanic" notifications@github.com wrote:

Initially I used GitHub to clone a version of the source to my system
and installed it per the following commands:

$ git clone https://github.com/Pybonacci/poliastro.git
$ cd poliastro/
$ python setup.py install

Not happy with the results I got from running the tests, I uninstalled
poliastro using the command "pip uninstall poliastro" and when realizing
that the preferred method of installing poliastro was to use pip, I
reinstalled poliastro using the command "pip install poliastro".

After looking at the installation procedures under "Getting Started" is
there a difference in just using "pip install poliastro" as opposed to
using "pip install numpy astropy matplotlib poliastro" as cite on the
webpage, even though I have numpy, astropy and matplotlib already
installed?

On 04/24/2015 04:57:12, Juan Luis Cano Rodríguez wrote:

Thanks @OrbitalMechanic https://github.com/OrbitalMechanic, I
changed the formatting of your last comment to properly see the result
(you can use triple backticks ``` for that). Can you tell me how did
you download poliastro and which astropy version do you have?

If I understood correctly, you manage your Python packages through
Anaconda and the root environment is installed in a location which
needs super admin privileges, am I right? Perhaps you can try to
create a conda environment to make testing easier:

|$ conda create -n poliastro27 python=2.7 numpy astropy matplotlib numba
$ source activate poliastro27
$ cd poliastro
$ python setup.py install
|

Reply to this email directly or view it on GitHub
<#35 (comment)
.

Reply to this email directly or view it on GitHub
#35 (comment).

@OrbitalMechanic

This comment has been minimized.

OrbitalMechanic commented Apr 24, 2015

Please let me know when the 2.0.1 becomes available, and thanks for your
help. :-)

On 04/24/2015 13:02:01, Juan Luis Cano Rodríguez wrote:

While there is no difference between installing poliastro with all the
requirements explicitely or not when using pip, this will install the
stable version available in PyPI which is 2.0 and has some differences
with
the one from GitHub.

The first time you had many tests failing probably because of an old numba
version. It only works with the latest one, which is 0.18.2 if I recall
correctly.

The second time the tests failed because of a change in recent versions of
astropy that I had not tested with poliastro 2.0. I will therefore release
a 2.0.1 installable with pip without these problems.

Thanks for the bug report!
On Apr 24, 2015 3:29 PM, "OrbitalMechanic" notifications@github.com
wrote:

Initially I used GitHub to clone a version of the source to my system
and installed it per the following commands:

$ git clone https://github.com/Pybonacci/poliastro.git
$ cd poliastro/
$ python setup.py install

Not happy with the results I got from running the tests, I uninstalled
poliastro using the command "pip uninstall poliastro" and when realizing
that the preferred method of installing poliastro was to use pip, I
reinstalled poliastro using the command "pip install poliastro".

After looking at the installation procedures under "Getting Started" is
there a difference in just using "pip install poliastro" as opposed to
using "pip install numpy astropy matplotlib poliastro" as cite on the
webpage, even though I have numpy, astropy and matplotlib already
installed?

On 04/24/2015 04:57:12, Juan Luis Cano Rodríguez wrote:

Thanks @OrbitalMechanic https://github.com/OrbitalMechanic, I
changed the formatting of your last comment to properly see the result
(you can use triple backticks ``` for that). Can you tell me how did
you download poliastro and which astropy version do you have?

If I understood correctly, you manage your Python packages through
Anaconda and the root environment is installed in a location which
needs super admin privileges, am I right? Perhaps you can try to
create a conda environment to make testing easier:

|$ conda create -n poliastro27 python=2.7 numpy astropy matplotlib
numba
$ source activate poliastro27
$ cd poliastro
$ python setup.py install
|

Reply to this email directly or view it on GitHub

<#35 (comment)
.

Reply to this email directly or view it on GitHub

#35 (comment).


Reply to this email directly or view it on GitHub
#35 (comment).

@Juanlu001 Juanlu001 added the bug label Apr 26, 2015

@Juanlu001 Juanlu001 self-assigned this Apr 26, 2015

Juanlu001 added a commit that referenced this issue Apr 26, 2015

Merge pull request #36 from Juanlu001/fix-astropy-2.x
Fix failing tests for 2.x, closes #35
@Juanlu001

This comment has been minimized.

Member

Juanlu001 commented Apr 26, 2015

I just released poliastro 0.2.1 (not 2.0.1, sorry 😅) to fix this bug. You can already pip install it, I added your name to the release notes.

http://pybonacci.github.io/poliastro/changelog.html#new-in-poliastro-0-2-1

As soon as you try poliastro 0.2.1 and check that all test pass I will fix this issue.

@OrbitalMechanic

This comment has been minimized.

OrbitalMechanic commented Apr 26, 2015

I was able to install poliastro ver. 0.2.1 successfully. All tests ran
successfully - see below.

Thanks for your help. I really appreciated it.

Sam Dupree.

users-MacBook-Pro:~ user$ sudo pip install poliastro
Password:
Collecting poliastro
Downloading poliastro-0.2.1.tar.gz (86kB)
100% |████████████████████████████████| 90kB 1.2MB/s
Installing collected packages: poliastro
Running setup.py install for poliastro
Successfully installed poliastro-0.2.1
users-MacBook-Pro:~ user$ python -c "import poliastro; poliastro.test()"
========================================================== test session
starts ===========================================================
platform darwin -- Python 2.7.9 -- py-1.4.26 -- pytest-2.6.4
collected 30 items

anaconda/lib/python2.7/site-packages/poliastro/tests/test_bodies.py ....
anaconda/lib/python2.7/site-packages/poliastro/tests/test_maneuver.py ......
anaconda/lib/python2.7/site-packages/poliastro/tests/test_twobody.py
.................
anaconda/lib/python2.7/site-packages/poliastro/tests/test_util.py ...

======================================================= 30 passed in
3.95 seconds ========================================================
users-MacBook-Pro:~ user$

On 04/26/2015 04:19:39, Juan Luis Cano Rodríguez wrote:

I just released poliastro 0.2.1 (not 2.0.1, sorry 😅) to
fix this bug. You can already |pip install| it, I added your name in
the release notes.

http://pybonacci.github.io/poliastro/changelog.html#new-in-poliastro-0-2-1

As soon as you try poliastro 0.2.1 and check that all test pass I will
fix this issue.


Reply to this email directly or view it on GitHub
#35 (comment).

mail-signature

<IYA-2009.jpg>
<mmb_emblem-2.gif> Samuel H. Dupree, Jr.sdupree@speakeasy.net
10501 Rising Ridge Road
Apartment 201 http://users.speakeasy.net/~sdupree/
Fredericksburg, VA 22407, USA

 HOME: 540-693-1240            WORK: 540-653-6509     FAX: 866-514-9629

/ "The Greatest Show on Earth" is not on Earth. It's in Space!/


@Juanlu001

This comment has been minimized.

Member

Juanlu001 commented Apr 26, 2015

Perfect, thanks! Don't hesitate to send me your criticism or ideas about the package. Before May 10th I will release version 0.3, with substantial improvements :)

Closing!

@Juanlu001 Juanlu001 closed this Apr 26, 2015

@ashalogu23

This comment has been minimized.

ashalogu23 commented Feb 24, 2016

This is from poliastro 0.4 run on ubuntu 15.10
No plots are genertaed with poliastro.
Matplotlib examples work well

from poliastro.plotting import OrbitPlotter
op = OrbitPlotter()
#ss_a, ss_f = ss_i.apply_maneuver(hoh, intermediate=True)
op.plot(ss, label="Initial orbit")

The output

[<matplotlib.lines.Line2D at 0x7f808c286278>,
 <matplotlib.lines.Line2D at 0x7f808c1b3438>]

no plots

ss = State.from_vectors(Earth, r, v)
ss.epoch
ss.epoch.iso
from poliastro.plotting import plot
plot(ss)

output

/home/loga/anaconda3/lib/python3.5/site-packages/matplotlib/axes/_axes.py:519: UserWarning: No labelled objects found. Use label='...' kwarg on individual plots.
  warnings.warn("No labelled objects found. "

OUT[9][<matplotlib.lines.Line2D at 0x7f808c17ecc0>,
 <matplotlib.lines.Line2D at 0x7f808c1859e8>]
@Juanlu001

This comment has been minimized.

Member

Juanlu001 commented Feb 24, 2016

Hello @ashalogu23, I guess you are missing a pyplot.show() call at the end. Try the Jupyter notebook for nicer interactive plots. The last warning was fixed as part of #103. Please open a new issue if the problem persists.

@poliastro poliastro locked and limited conversation to collaborators Feb 24, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.