getting started, help wanted
See original GitHub issue🐞 Problem I see several problems with tests after conda install, plus error on first import when typing python lines from http://docs.poliastro.space/en/latest/examples/Going to Mars with Python using poliastro.html into a terminal.
I installed using the recommended
$ conda install poliastro --channel conda-forge
I then typed “python” and tried the first few lines of the “Going to Mars” tutorial. First poliastro import failed as follows:
>>> if True:
... import numpy as np
... import astropy.units as u
... from astropy import time
...
>>> from poliastro import iod
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/david/anaconda/lib/python2.7/site-packages/poliastro/iod/__init__.py", line 2, in <module>
from poliastro.iod.izzo import lambert
File "/Users/david/anaconda/lib/python2.7/site-packages/poliastro/iod/izzo.py", line 9, in <module>
from poliastro.util import norm
File "/Users/david/anaconda/lib/python2.7/site-packages/poliastro/util.py", line 77
def time_range(start, *, periods=50, spacing=None, end=None):
^
SyntaxError: invalid syntax
🖥 Please paste the output of following commands
conda info -a
$ conda info -a
active environment : None
user config file : /Users/david/.condarc
populated config files :
conda version : 4.5.6
conda-build version : 0+unknown
python version : 2.7.13.final.0
base environment : /Users/david/anaconda (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/osx-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/pro/osx-64
https://repo.anaconda.com/pkgs/pro/noarch
package cache : /Users/david/anaconda/pkgs
/Users/david/.conda/pkgs
envs directories : /Users/david/anaconda/envs
/Users/david/.conda/envs
platform : osx-64
user-agent : conda/4.5.6 requests/2.12.4 CPython/2.7.13 Darwin/15.6.0 OSX/10.11.6
UID:GID : 501:20
netrc file : None
offline mode : False
# conda environments:
#
base * /Users/david/anaconda
py3_scipy /Users/david/anaconda/envs/py3_scipy
scipyode /Users/david/anaconda/envs/scipyode
sys.version: 2.7.13 |Anaconda custom (x86_64)| (defau...
sys.prefix: /Users/david/anaconda
sys.executable: /Users/david/anaconda/bin/python
conda location: /Users/david/anaconda/lib/python2.7/site-packages/conda
conda-build: /Users/david/anaconda/bin/conda-build
conda-convert: /Users/david/anaconda/bin/conda-convert
conda-develop: /Users/david/anaconda/bin/conda-develop
conda-env: /Users/david/anaconda/bin/conda-env
conda-index: /Users/david/anaconda/bin/conda-index
conda-inspect: /Users/david/anaconda/bin/conda-inspect
conda-metapackage: /Users/david/anaconda/bin/conda-metapackage
conda-pipbuild: /Users/david/anaconda/bin/conda-pipbuild
conda-server: /Users/david/anaconda/bin/conda-server
conda-sign: /Users/david/anaconda/bin/conda-sign
conda-skeleton: /Users/david/anaconda/bin/conda-skeleton
user site dirs:
CIO_TEST: <not set>
CONDA_ROOT: /Users/david/anaconda
PATH: /Users/david/anaconda/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
REQUESTS_CA_BUNDLE: <not set>
SSL_CERT_FILE: <not set>
License directories:
/Users/david/.continuum
/Users/david/Library/Application Support/Anaconda
/Users/david/anaconda/licenses
License files (license*.txt):
Package/feature end dates:
python -c "import poliastro.testing; poliastro.testing.test()"
$ python -c "import poliastro.testing; poliastro.testing.test()"
============================= test session starts ==============================
platform darwin -- Python 2.7.13, pytest-2.8.5, py-1.4.31, pluggy-0.3.1
rootdir: /Users/david, inifile:
collected 23 items / 19 errors
anaconda/lib/python2.7/site-packages/poliastro/tests/test_bodies.py ..F...
anaconda/lib/python2.7/site-packages/poliastro/tests/test_hyper.py ...........
anaconda/lib/python2.7/site-packages/poliastro/tests/test_jit.py ..F
anaconda/lib/python2.7/site-packages/poliastro/tests/test_stumpff.py FFF
==================================== ERRORS ====================================
ERROR collecting anaconda/lib/python2.7/site-packages/poliastro/tests/test_coordinates.py
anaconda/lib/python2.7/site-packages/_pytest/python.py:610: in _importtestmodule
mod = self.fspath.pyimport(ensuresyspath=importmode)
anaconda/lib/python2.7/site-packages/py/_path/local.py:650: in pyimport
__import__(modname)
anaconda/lib/python2.7/site-packages/_pytest/assertion/rewrite.py:171: in load_module
py.builtin.exec_(co, mod.__dict__)
anaconda/lib/python2.7/site-packages/poliastro/tests/test_coordinates.py:6: in <module>
from poliastro import coordinates, bodies
anaconda/lib/python2.7/site-packages/poliastro/coordinates.py:15: in <module>
from poliastro.twobody.rv import rv2coe
anaconda/lib/python2.7/site-packages/poliastro/twobody/__init__.py:1: in <module>
from poliastro.twobody.orbit import Orbit
anaconda/lib/python2.7/site-packages/poliastro/twobody/orbit.py:12: in <module>
from poliastro.twobody.propagation import propagate, cowell, kepler, mean_motion
E File "/Users/david/anaconda/lib/python2.7/site-packages/poliastro/twobody/propagation.py", line 51
E def cowell(orbit, tof, rtol=1e-10, *, ad=None, callback=None, nsteps=1000, **ad_kwargs):
E ^
E SyntaxError: invalid syntax
ERROR collecting anaconda/lib/python2.7/site-packages/poliastro/tests/test_examples.py
anaconda/lib/python2.7/site-packages/_pytest/python.py:610: in _importtestmodule
mod = self.fspath.pyimport(ensuresyspath=importmode)
anaconda/lib/python2.7/site-packages/py/_path/local.py:650: in pyimport
__import__(modname)
anaconda/lib/python2.7/site-packages/_pytest/assertion/rewrite.py:171: in load_module
py.builtin.exec_(co, mod.__dict__)
anaconda/lib/python2.7/site-packages/poliastro/tests/test_examples.py:2: in <module>
from poliastro import examples
anaconda/lib/python2.7/site-packages/poliastro/examples.py:8: in <module>
from poliastro.twobody import Orbit
anaconda/lib/python2.7/site-packages/poliastro/twobody/__init__.py:1: in <module>
from poliastro.twobody.orbit import Orbit
anaconda/lib/python2.7/site-packages/poliastro/twobody/orbit.py:12: in <module>
from poliastro.twobody.propagation import propagate, cowell, kepler, mean_motion
E File "/Users/david/anaconda/lib/python2.7/site-packages/poliastro/twobody/propagation.py", line 51
E def cowell(orbit, tof, rtol=1e-10, *, ad=None, callback=None, nsteps=1000, **ad_kwargs):
E ^
E SyntaxError: invalid syntax
ERROR collecting anaconda/lib/python2.7/site-packages/poliastro/tests/test_iod.py
anaconda/lib/python2.7/site-packages/_pytest/python.py:610: in _importtestmodule
mod = self.fspath.pyimport(ensuresyspath=importmode)
anaconda/lib/python2.7/site-packages/py/_path/local.py:650: in pyimport
__import__(modname)
anaconda/lib/python2.7/site-packages/_pytest/assertion/rewrite.py:171: in load_module
py.builtin.exec_(co, mod.__dict__)
anaconda/lib/python2.7/site-packages/poliastro/tests/test_iod.py:8: in <module>
from poliastro.iod import izzo, vallado
anaconda/lib/python2.7/site-packages/poliastro/iod/__init__.py:2: in <module>
from poliastro.iod.izzo import lambert
anaconda/lib/python2.7/site-packages/poliastro/iod/izzo.py:9: in <module>
from poliastro.util import norm
E File "/Users/david/anaconda/lib/python2.7/site-packages/poliastro/util.py", line 77
E def time_range(start, *, periods=50, spacing=None, end=None):
E ^
E SyntaxError: invalid syntax
ERROR collecting anaconda/lib/python2.7/site-packages/poliastro/tests/test_maneuver.py
anaconda/lib/python2.7/site-packages/_pytest/python.py:610: in _importtestmodule
mod = self.fspath.pyimport(ensuresyspath=importmode)
anaconda/lib/python2.7/site-packages/py/_path/local.py:650: in pyimport
__import__(modname)
anaconda/lib/python2.7/site-packages/_pytest/assertion/rewrite.py:171: in load_module
py.builtin.exec_(co, mod.__dict__)
anaconda/lib/python2.7/site-packages/poliastro/tests/test_maneuver.py:10: in <module>
from poliastro.twobody import Orbit
anaconda/lib/python2.7/site-packages/poliastro/twobody/__init__.py:1: in <module>
from poliastro.twobody.orbit import Orbit
anaconda/lib/python2.7/site-packages/poliastro/twobody/orbit.py:12: in <module>
from poliastro.twobody.propagation import propagate, cowell, kepler, mean_motion
E File "/Users/david/anaconda/lib/python2.7/site-packages/poliastro/twobody/propagation.py", line 51
E def cowell(orbit, tof, rtol=1e-10, *, ad=None, callback=None, nsteps=1000, **ad_kwargs):
E ^
E SyntaxError: invalid syntax
ERROR collecting anaconda/lib/python2.7/site-packages/poliastro/tests/test_patched_conics.py
anaconda/lib/python2.7/site-packages/_pytest/python.py:610: in _importtestmodule
mod = self.fspath.pyimport(ensuresyspath=importmode)
anaconda/lib/python2.7/site-packages/py/_path/local.py:650: in pyimport
__import__(modname)
anaconda/lib/python2.7/site-packages/_pytest/assertion/rewrite.py:171: in load_module
py.builtin.exec_(co, mod.__dict__)
anaconda/lib/python2.7/site-packages/poliastro/tests/test_patched_conics.py:8: in <module>
from poliastro.patched_conics import compute_soi
anaconda/lib/python2.7/site-packages/poliastro/patched_conics.py:9: in <module>
from poliastro.twobody import Orbit
anaconda/lib/python2.7/site-packages/poliastro/twobody/__init__.py:1: in <module>
from poliastro.twobody.orbit import Orbit
anaconda/lib/python2.7/site-packages/poliastro/twobody/orbit.py:12: in <module>
from poliastro.twobody.propagation import propagate, cowell, kepler, mean_motion
E File "/Users/david/anaconda/lib/python2.7/site-packages/poliastro/twobody/propagation.py", line 51
E def cowell(orbit, tof, rtol=1e-10, *, ad=None, callback=None, nsteps=1000, **ad_kwargs):
E ^
E SyntaxError: invalid syntax
ERROR collecting anaconda/lib/python2.7/site-packages/poliastro/tests/test_plotting.py
anaconda/lib/python2.7/site-packages/_pytest/python.py:610: in _importtestmodule
mod = self.fspath.pyimport(ensuresyspath=importmode)
anaconda/lib/python2.7/site-packages/py/_path/local.py:650: in pyimport
__import__(modname)
anaconda/lib/python2.7/site-packages/_pytest/assertion/rewrite.py:171: in load_module
py.builtin.exec_(co, mod.__dict__)
anaconda/lib/python2.7/site-packages/poliastro/tests/test_plotting.py:7: in <module>
from poliastro.examples import iss
anaconda/lib/python2.7/site-packages/poliastro/examples.py:8: in <module>
from poliastro.twobody import Orbit
anaconda/lib/python2.7/site-packages/poliastro/twobody/__init__.py:1: in <module>
from poliastro.twobody.orbit import Orbit
anaconda/lib/python2.7/site-packages/poliastro/twobody/orbit.py:12: in <module>
from poliastro.twobody.propagation import propagate, cowell, kepler, mean_motion
E File "/Users/david/anaconda/lib/python2.7/site-packages/poliastro/twobody/propagation.py", line 51
E def cowell(orbit, tof, rtol=1e-10, *, ad=None, callback=None, nsteps=1000, **ad_kwargs):
E ^
E SyntaxError: invalid syntax
ERROR collecting anaconda/lib/python2.7/site-packages/poliastro/tests/test_plotting2d.py
anaconda/lib/python2.7/site-packages/poliastro/tests/test_plotting2d.py:5: in <module>
from unittest import mock
E ImportError: cannot import name mock
ERROR collecting anaconda/lib/python2.7/site-packages/poliastro/tests/test_plotting3d.py
anaconda/lib/python2.7/site-packages/poliastro/tests/test_plotting3d.py:3: in <module>
from unittest import mock
E ImportError: cannot import name mock
ERROR collecting anaconda/lib/python2.7/site-packages/poliastro/tests/test_twobody.py
anaconda/lib/python2.7/site-packages/_pytest/python.py:610: in _importtestmodule
mod = self.fspath.pyimport(ensuresyspath=importmode)
anaconda/lib/python2.7/site-packages/py/_path/local.py:650: in pyimport
__import__(modname)
anaconda/lib/python2.7/site-packages/_pytest/assertion/rewrite.py:171: in load_module
py.builtin.exec_(co, mod.__dict__)
anaconda/lib/python2.7/site-packages/poliastro/tests/test_twobody.py:8: in <module>
from poliastro.twobody.rv import rv2coe
anaconda/lib/python2.7/site-packages/poliastro/twobody/__init__.py:1: in <module>
from poliastro.twobody.orbit import Orbit
anaconda/lib/python2.7/site-packages/poliastro/twobody/orbit.py:12: in <module>
from poliastro.twobody.propagation import propagate, cowell, kepler, mean_motion
E File "/Users/david/anaconda/lib/python2.7/site-packages/poliastro/twobody/propagation.py", line 51
E def cowell(orbit, tof, rtol=1e-10, *, ad=None, callback=None, nsteps=1000, **ad_kwargs):
E ^
E SyntaxError: invalid syntax
ERROR collecting anaconda/lib/python2.7/site-packages/poliastro/tests/test_util.py
anaconda/lib/python2.7/site-packages/_pytest/python.py:610: in _importtestmodule
mod = self.fspath.pyimport(ensuresyspath=importmode)
anaconda/lib/python2.7/site-packages/py/_path/local.py:650: in pyimport
__import__(modname)
anaconda/lib/python2.7/site-packages/_pytest/assertion/rewrite.py:171: in load_module
py.builtin.exec_(co, mod.__dict__)
anaconda/lib/python2.7/site-packages/poliastro/tests/test_util.py:10: in <module>
from poliastro import util
E File "/Users/david/anaconda/lib/python2.7/site-packages/poliastro/util.py", line 77
E def time_range(start, *, periods=50, spacing=None, end=None):
E ^
E SyntaxError: invalid syntax
ERROR collecting anaconda/lib/python2.7/site-packages/poliastro/tests/tests_neos/test_dastcom5.py
anaconda/lib/python2.7/site-packages/poliastro/tests/tests_neos/test_dastcom5.py:1: in <module>
from unittest import mock
E ImportError: cannot import name mock
ERROR collecting anaconda/lib/python2.7/site-packages/poliastro/tests/tests_neos/test_neos_neows.py
anaconda/lib/python2.7/site-packages/poliastro/tests/tests_neos/test_neos_neows.py:2: in <module>
from unittest import mock
E ImportError: cannot import name mock
ERROR collecting anaconda/lib/python2.7/site-packages/poliastro/tests/tests_twobody/test_angles.py
anaconda/lib/python2.7/site-packages/_pytest/python.py:610: in _importtestmodule
mod = self.fspath.pyimport(ensuresyspath=importmode)
anaconda/lib/python2.7/site-packages/py/_path/local.py:650: in pyimport
__import__(modname)
anaconda/lib/python2.7/site-packages/_pytest/assertion/rewrite.py:171: in load_module
py.builtin.exec_(co, mod.__dict__)
anaconda/lib/python2.7/site-packages/poliastro/tests/tests_twobody/test_angles.py:7: in <module>
from poliastro.twobody import angles
anaconda/lib/python2.7/site-packages/poliastro/twobody/__init__.py:1: in <module>
from poliastro.twobody.orbit import Orbit
anaconda/lib/python2.7/site-packages/poliastro/twobody/orbit.py:12: in <module>
from poliastro.twobody.propagation import propagate, cowell, kepler, mean_motion
E File "/Users/david/anaconda/lib/python2.7/site-packages/poliastro/twobody/propagation.py", line 51
E def cowell(orbit, tof, rtol=1e-10, *, ad=None, callback=None, nsteps=1000, **ad_kwargs):
E ^
E SyntaxError: invalid syntax
ERROR collecting anaconda/lib/python2.7/site-packages/poliastro/tests/tests_twobody/test_decorators.py
anaconda/lib/python2.7/site-packages/_pytest/python.py:610: in _importtestmodule
mod = self.fspath.pyimport(ensuresyspath=importmode)
anaconda/lib/python2.7/site-packages/py/_path/local.py:650: in pyimport
__import__(modname)
anaconda/lib/python2.7/site-packages/_pytest/assertion/rewrite.py:171: in load_module
py.builtin.exec_(co, mod.__dict__)
anaconda/lib/python2.7/site-packages/poliastro/tests/tests_twobody/test_decorators.py:5: in <module>
from poliastro.twobody.decorators import state_from_vector
anaconda/lib/python2.7/site-packages/poliastro/twobody/__init__.py:1: in <module>
from poliastro.twobody.orbit import Orbit
anaconda/lib/python2.7/site-packages/poliastro/twobody/orbit.py:12: in <module>
from poliastro.twobody.propagation import propagate, cowell, kepler, mean_motion
E File "/Users/david/anaconda/lib/python2.7/site-packages/poliastro/twobody/propagation.py", line 51
E def cowell(orbit, tof, rtol=1e-10, *, ad=None, callback=None, nsteps=1000, **ad_kwargs):
E ^
E SyntaxError: invalid syntax
ERROR collecting anaconda/lib/python2.7/site-packages/poliastro/tests/tests_twobody/test_orbit.py
anaconda/lib/python2.7/site-packages/_pytest/python.py:610: in _importtestmodule
mod = self.fspath.pyimport(ensuresyspath=importmode)
anaconda/lib/python2.7/site-packages/py/_path/local.py:650: in pyimport
__import__(modname)
anaconda/lib/python2.7/site-packages/_pytest/assertion/rewrite.py:171: in load_module
py.builtin.exec_(co, mod.__dict__)
anaconda/lib/python2.7/site-packages/poliastro/tests/tests_twobody/test_orbit.py:14: in <module>
from poliastro.twobody import Orbit
anaconda/lib/python2.7/site-packages/poliastro/twobody/__init__.py:1: in <module>
from poliastro.twobody.orbit import Orbit
anaconda/lib/python2.7/site-packages/poliastro/twobody/orbit.py:12: in <module>
from poliastro.twobody.propagation import propagate, cowell, kepler, mean_motion
E File "/Users/david/anaconda/lib/python2.7/site-packages/poliastro/twobody/propagation.py", line 51
E def cowell(orbit, tof, rtol=1e-10, *, ad=None, callback=None, nsteps=1000, **ad_kwargs):
E ^
E SyntaxError: invalid syntax
ERROR collecting anaconda/lib/python2.7/site-packages/poliastro/tests/tests_twobody/test_perturbations.py
anaconda/lib/python2.7/site-packages/_pytest/python.py:610: in _importtestmodule
mod = self.fspath.pyimport(ensuresyspath=importmode)
anaconda/lib/python2.7/site-packages/py/_path/local.py:650: in pyimport
__import__(modname)
anaconda/lib/python2.7/site-packages/_pytest/assertion/rewrite.py:171: in load_module
py.builtin.exec_(co, mod.__dict__)
anaconda/lib/python2.7/site-packages/poliastro/tests/tests_twobody/test_perturbations.py:2: in <module>
from poliastro.twobody.propagation import cowell
anaconda/lib/python2.7/site-packages/poliastro/twobody/__init__.py:1: in <module>
from poliastro.twobody.orbit import Orbit
anaconda/lib/python2.7/site-packages/poliastro/twobody/orbit.py:12: in <module>
from poliastro.twobody.propagation import propagate, cowell, kepler, mean_motion
E File "/Users/david/anaconda/lib/python2.7/site-packages/poliastro/twobody/propagation.py", line 51
E def cowell(orbit, tof, rtol=1e-10, *, ad=None, callback=None, nsteps=1000, **ad_kwargs):
E ^
E SyntaxError: invalid syntax
ERROR collecting anaconda/lib/python2.7/site-packages/poliastro/tests/tests_twobody/test_propagation.py
anaconda/lib/python2.7/site-packages/poliastro/tests/tests_twobody/test_propagation.py:1: in <module>
from pytest import approx
E ImportError: cannot import name approx
ERROR collecting anaconda/lib/python2.7/site-packages/poliastro/tests/tests_twobody/test_sample.py
anaconda/lib/python2.7/site-packages/_pytest/python.py:610: in _importtestmodule
mod = self.fspath.pyimport(ensuresyspath=importmode)
anaconda/lib/python2.7/site-packages/py/_path/local.py:650: in pyimport
__import__(modname)
anaconda/lib/python2.7/site-packages/_pytest/assertion/rewrite.py:171: in load_module
py.builtin.exec_(co, mod.__dict__)
anaconda/lib/python2.7/site-packages/poliastro/tests/tests_twobody/test_sample.py:8: in <module>
from poliastro.twobody import Orbit
anaconda/lib/python2.7/site-packages/poliastro/twobody/__init__.py:1: in <module>
from poliastro.twobody.orbit import Orbit
anaconda/lib/python2.7/site-packages/poliastro/twobody/orbit.py:12: in <module>
from poliastro.twobody.propagation import propagate, cowell, kepler, mean_motion
E File "/Users/david/anaconda/lib/python2.7/site-packages/poliastro/twobody/propagation.py", line 51
E def cowell(orbit, tof, rtol=1e-10, *, ad=None, callback=None, nsteps=1000, **ad_kwargs):
E ^
E SyntaxError: invalid syntax
ERROR collecting anaconda/lib/python2.7/site-packages/poliastro/tests/tests_twobody/test_states.py
anaconda/lib/python2.7/site-packages/_pytest/python.py:610: in _importtestmodule
mod = self.fspath.pyimport(ensuresyspath=importmode)
anaconda/lib/python2.7/site-packages/py/_path/local.py:650: in pyimport
__import__(modname)
anaconda/lib/python2.7/site-packages/_pytest/assertion/rewrite.py:171: in load_module
py.builtin.exec_(co, mod.__dict__)
anaconda/lib/python2.7/site-packages/poliastro/tests/tests_twobody/test_states.py:8: in <module>
from poliastro.twobody.rv import RVState
anaconda/lib/python2.7/site-packages/poliastro/twobody/__init__.py:1: in <module>
from poliastro.twobody.orbit import Orbit
anaconda/lib/python2.7/site-packages/poliastro/twobody/orbit.py:12: in <module>
from poliastro.twobody.propagation import propagate, cowell, kepler, mean_motion
E File "/Users/david/anaconda/lib/python2.7/site-packages/poliastro/twobody/propagation.py", line 51
E def cowell(orbit, tof, rtol=1e-10, *, ad=None, callback=None, nsteps=1000, **ad_kwargs):
E ^
E SyntaxError: invalid syntax
=================================== FAILURES ===================================
____________________ test_body_printing_has_name_and_symbol ____________________
def test_body_printing_has_name_and_symbol():
name = "2 Pallas"
symbol = u"\u26b4"
k = 1.41e10 * u.m ** 3 / u.s ** 2
pallas2 = bodies.Body(None, k, name, symbol)
> assert name in str(pallas2)
E UnicodeEncodeError: 'ascii' codec can't encode character u'\u26b4' in position 10: ordinal not in range(128)
anaconda/lib/python2.7/site-packages/poliastro/tests/test_bodies.py:30: UnicodeEncodeError
_________________________ test_no_numba_emits_warning __________________________
recwarn = <_pytest.recwarn.WarningsRecorder object at 0x1142af0d0>
def test_no_numba_emits_warning(recwarn):
with _fake_numba_import():
from poliastro import jit
assert len(recwarn) == 1
w = recwarn.pop(UserWarning)
assert issubclass(w.category, UserWarning)
> assert "Could not import numba package" in str(w.message)
anaconda/lib/python2.7/site-packages/poliastro/tests/test_jit.py:60:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
anaconda/lib/python2.7/contextlib.py:24: in __exit__
self.gen.next()
anaconda/lib/python2.7/site-packages/poliastro/tests/test_jit.py:35: in _fake_numba_import
import numba
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""
from __future__ import print_function, division, absolute_import
import re
import sys
> from . import config, errors, runtests, types
E ImportError: cannot import name config
anaconda/lib/python2.7/site-packages/numba/__init__.py:9: ImportError
----------------------------- Captured stderr call -----------------------------
/Users/david/anaconda/lib/python2.7/site-packages/poliastro/jit.py:29: UserWarning: Could not import numba package. All poliastro functions will work properly but the CPU intensive algorithms will be slow. Consider installing numba to boost performance.
warnings.warn("Could not import numba package. All poliastro "
_______________________ test_stumpff_functions_near_zero _______________________
def test_stumpff_functions_near_zero():
psi = 0.5
expected_c2 = (1 - cos(psi**.5)) / psi
expected_c3 = (psi**.5 - sin(psi**.5)) / psi**1.5
> assert_allclose(c2(psi), expected_c2)
anaconda/lib/python2.7/site-packages/poliastro/tests/test_stumpff.py:12:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
anaconda/lib/python2.7/site-packages/numba/dispatcher.py:277: in _compile_for_args
return self.compile(tuple(real_args))
anaconda/lib/python2.7/site-packages/numba/dispatcher.py:495: in compile
cres = self._compiler.compile(args, return_type)
anaconda/lib/python2.7/site-packages/numba/dispatcher.py:76: in compile
flags=flags, locals=self.locals)
anaconda/lib/python2.7/site-packages/numba/compiler.py:696: in compile_extra
return pipeline.compile_extra(func)
anaconda/lib/python2.7/site-packages/numba/compiler.py:369: in compile_extra
return self.compile_bytecode(bc, func_attr=self.func_attr)
anaconda/lib/python2.7/site-packages/numba/compiler.py:378: in compile_bytecode
return self._compile_bytecode()
anaconda/lib/python2.7/site-packages/numba/compiler.py:662: in _compile_bytecode
res = pm.run(self.status)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <numba.compiler._PipelineManager object at 0x1142e6810>
status = fail_reason=None, can_fallback=False, can_giveup=0
def run(self, status):
assert self._finalized, "PM must be finalized before run()"
res = None
for pipeline_name in self.pipeline_order:
event(pipeline_name)
is_final_pipeline = pipeline_name == self.pipeline_order[-1]
for stage, stage_name in self.pipeline_stages[pipeline_name]:
try:
event(stage_name)
stage()
except _EarlyPipelineCompletion as e:
return e.result
except BaseException as e:
msg = "Failed at %s (%s)" % (pipeline_name, stage_name)
patched_exception = self._patch_error(msg, e)
# No more fallback pipelines?
if is_final_pipeline:
> raise patched_exception
E TypingError: Caused By:
E Traceback (most recent call last):
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/compiler.py", line 249, in run
E stage()
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/compiler.py", line 466, in stage_nopython_frontend
E self.locals)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/compiler.py", line 807, in type_inference_stage
E infer.propagate()
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typeinfer.py", line 613, in propagate
E raise errors[0]
E TypingError: Internal error at <numba.typeinfer.IntrinsicCallConstraint object at 0x11430d490>:
E --%<-----------------------------------------------------------------
E Traceback (most recent call last):
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typeinfer.py", line 114, in propagate
E constraint(typeinfer)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typeinfer.py", line 384, in __call__
E self.resolve(typeinfer, typeinfer.typevars, fnty=self.func)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typeinfer.py", line 344, in resolve
E sig = context.resolve_function_type(fnty, pos_args, kw_args)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typing/context.py", line 112, in resolve_function_type
E res = defn.apply(args, kws)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typing/templates.py", line 185, in apply
E sig = generic(args, kws)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typing/npydecl.py", line 203, in generic
E sig = super(NumpyRulesArrayOperator, self).generic(args, kws)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typing/npydecl.py", line 107, in generic
E if not supported_ufunc_loop(ufunc, ufunc_loop):
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/numpy_support.py", line 226, in supported_ufunc_loop
E from .targets import ufunc_db
E SystemError: Parent module 'numba' not loaded, cannot perform relative import
E --%<-----------------------------------------------------------------
E
E File "anaconda/lib/python2.7/site-packages/poliastro/stumpff.py", line 22
E
E Failed at nopython (nopython frontend)
E Internal error at <numba.typeinfer.IntrinsicCallConstraint object at 0x11430d490>:
E --%<-----------------------------------------------------------------
E Traceback (most recent call last):
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typeinfer.py", line 114, in propagate
E constraint(typeinfer)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typeinfer.py", line 384, in __call__
E self.resolve(typeinfer, typeinfer.typevars, fnty=self.func)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typeinfer.py", line 344, in resolve
E sig = context.resolve_function_type(fnty, pos_args, kw_args)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typing/context.py", line 112, in resolve_function_type
E res = defn.apply(args, kws)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typing/templates.py", line 185, in apply
E sig = generic(args, kws)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typing/npydecl.py", line 203, in generic
E sig = super(NumpyRulesArrayOperator, self).generic(args, kws)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typing/npydecl.py", line 107, in generic
E if not supported_ufunc_loop(ufunc, ufunc_loop):
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/numpy_support.py", line 226, in supported_ufunc_loop
E from .targets import ufunc_db
E SystemError: Parent module 'numba' not loaded, cannot perform relative import
E --%<-----------------------------------------------------------------
E
E File "anaconda/lib/python2.7/site-packages/poliastro/stumpff.py", line 22
anaconda/lib/python2.7/site-packages/numba/compiler.py:257: TypingError
______________________ test_stumpff_functions_above_zero _______________________
def test_stumpff_functions_above_zero():
psi = 3.0
expected_c2 = (1 - cos(psi**.5)) / psi
expected_c3 = (psi**.5 - sin(psi**.5)) / psi**1.5
> assert_equal(c2(psi), expected_c2)
anaconda/lib/python2.7/site-packages/poliastro/tests/test_stumpff.py:21:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
anaconda/lib/python2.7/site-packages/numba/dispatcher.py:277: in _compile_for_args
return self.compile(tuple(real_args))
anaconda/lib/python2.7/site-packages/numba/dispatcher.py:495: in compile
cres = self._compiler.compile(args, return_type)
anaconda/lib/python2.7/site-packages/numba/dispatcher.py:76: in compile
flags=flags, locals=self.locals)
anaconda/lib/python2.7/site-packages/numba/compiler.py:696: in compile_extra
return pipeline.compile_extra(func)
anaconda/lib/python2.7/site-packages/numba/compiler.py:369: in compile_extra
return self.compile_bytecode(bc, func_attr=self.func_attr)
anaconda/lib/python2.7/site-packages/numba/compiler.py:378: in compile_bytecode
return self._compile_bytecode()
anaconda/lib/python2.7/site-packages/numba/compiler.py:662: in _compile_bytecode
res = pm.run(self.status)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <numba.compiler._PipelineManager object at 0x11441f850>
status = fail_reason=None, can_fallback=False, can_giveup=0
def run(self, status):
assert self._finalized, "PM must be finalized before run()"
res = None
for pipeline_name in self.pipeline_order:
event(pipeline_name)
is_final_pipeline = pipeline_name == self.pipeline_order[-1]
for stage, stage_name in self.pipeline_stages[pipeline_name]:
try:
event(stage_name)
stage()
except _EarlyPipelineCompletion as e:
return e.result
except BaseException as e:
msg = "Failed at %s (%s)" % (pipeline_name, stage_name)
patched_exception = self._patch_error(msg, e)
# No more fallback pipelines?
if is_final_pipeline:
> raise patched_exception
E TypingError: Caused By:
E Traceback (most recent call last):
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/compiler.py", line 249, in run
E stage()
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/compiler.py", line 466, in stage_nopython_frontend
E self.locals)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/compiler.py", line 807, in type_inference_stage
E infer.propagate()
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typeinfer.py", line 613, in propagate
E raise errors[0]
E TypingError: Internal error at <numba.typeinfer.IntrinsicCallConstraint object at 0x1143edd50>:
E --%<-----------------------------------------------------------------
E Traceback (most recent call last):
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typeinfer.py", line 114, in propagate
E constraint(typeinfer)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typeinfer.py", line 384, in __call__
E self.resolve(typeinfer, typeinfer.typevars, fnty=self.func)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typeinfer.py", line 344, in resolve
E sig = context.resolve_function_type(fnty, pos_args, kw_args)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typing/context.py", line 112, in resolve_function_type
E res = defn.apply(args, kws)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typing/templates.py", line 185, in apply
E sig = generic(args, kws)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typing/npydecl.py", line 203, in generic
E sig = super(NumpyRulesArrayOperator, self).generic(args, kws)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typing/npydecl.py", line 107, in generic
E if not supported_ufunc_loop(ufunc, ufunc_loop):
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/numpy_support.py", line 226, in supported_ufunc_loop
E from .targets import ufunc_db
E SystemError: Parent module 'numba' not loaded, cannot perform relative import
E --%<-----------------------------------------------------------------
E
E File "anaconda/lib/python2.7/site-packages/poliastro/stumpff.py", line 22
E
E Failed at nopython (nopython frontend)
E Internal error at <numba.typeinfer.IntrinsicCallConstraint object at 0x1143edd50>:
E --%<-----------------------------------------------------------------
E Traceback (most recent call last):
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typeinfer.py", line 114, in propagate
E constraint(typeinfer)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typeinfer.py", line 384, in __call__
E self.resolve(typeinfer, typeinfer.typevars, fnty=self.func)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typeinfer.py", line 344, in resolve
E sig = context.resolve_function_type(fnty, pos_args, kw_args)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typing/context.py", line 112, in resolve_function_type
E res = defn.apply(args, kws)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typing/templates.py", line 185, in apply
E sig = generic(args, kws)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typing/npydecl.py", line 203, in generic
E sig = super(NumpyRulesArrayOperator, self).generic(args, kws)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typing/npydecl.py", line 107, in generic
E if not supported_ufunc_loop(ufunc, ufunc_loop):
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/numpy_support.py", line 226, in supported_ufunc_loop
E from .targets import ufunc_db
E SystemError: Parent module 'numba' not loaded, cannot perform relative import
E --%<-----------------------------------------------------------------
E
E File "anaconda/lib/python2.7/site-packages/poliastro/stumpff.py", line 22
anaconda/lib/python2.7/site-packages/numba/compiler.py:257: TypingError
______________________ test_stumpff_functions_under_zero _______________________
def test_stumpff_functions_under_zero():
psi = -3.0
expected_c2 = (cosh((-psi)**.5) - 1) / (-psi)
expected_c3 = (sinh((-psi)**.5) - (-psi)**.5) / (-psi)**1.5
> assert_equal(c2(psi), expected_c2)
anaconda/lib/python2.7/site-packages/poliastro/tests/test_stumpff.py:30:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
anaconda/lib/python2.7/site-packages/numba/dispatcher.py:277: in _compile_for_args
return self.compile(tuple(real_args))
anaconda/lib/python2.7/site-packages/numba/dispatcher.py:495: in compile
cres = self._compiler.compile(args, return_type)
anaconda/lib/python2.7/site-packages/numba/dispatcher.py:76: in compile
flags=flags, locals=self.locals)
anaconda/lib/python2.7/site-packages/numba/compiler.py:696: in compile_extra
return pipeline.compile_extra(func)
anaconda/lib/python2.7/site-packages/numba/compiler.py:369: in compile_extra
return self.compile_bytecode(bc, func_attr=self.func_attr)
anaconda/lib/python2.7/site-packages/numba/compiler.py:378: in compile_bytecode
return self._compile_bytecode()
anaconda/lib/python2.7/site-packages/numba/compiler.py:662: in _compile_bytecode
res = pm.run(self.status)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <numba.compiler._PipelineManager object at 0x1143edb50>
status = fail_reason=None, can_fallback=False, can_giveup=0
def run(self, status):
assert self._finalized, "PM must be finalized before run()"
res = None
for pipeline_name in self.pipeline_order:
event(pipeline_name)
is_final_pipeline = pipeline_name == self.pipeline_order[-1]
for stage, stage_name in self.pipeline_stages[pipeline_name]:
try:
event(stage_name)
stage()
except _EarlyPipelineCompletion as e:
return e.result
except BaseException as e:
msg = "Failed at %s (%s)" % (pipeline_name, stage_name)
patched_exception = self._patch_error(msg, e)
# No more fallback pipelines?
if is_final_pipeline:
> raise patched_exception
E TypingError: Caused By:
E Traceback (most recent call last):
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/compiler.py", line 249, in run
E stage()
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/compiler.py", line 466, in stage_nopython_frontend
E self.locals)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/compiler.py", line 807, in type_inference_stage
E infer.propagate()
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typeinfer.py", line 613, in propagate
E raise errors[0]
E TypingError: Internal error at <numba.typeinfer.IntrinsicCallConstraint object at 0x11462db10>:
E --%<-----------------------------------------------------------------
E Traceback (most recent call last):
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typeinfer.py", line 114, in propagate
E constraint(typeinfer)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typeinfer.py", line 384, in __call__
E self.resolve(typeinfer, typeinfer.typevars, fnty=self.func)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typeinfer.py", line 344, in resolve
E sig = context.resolve_function_type(fnty, pos_args, kw_args)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typing/context.py", line 112, in resolve_function_type
E res = defn.apply(args, kws)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typing/templates.py", line 185, in apply
E sig = generic(args, kws)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typing/npydecl.py", line 203, in generic
E sig = super(NumpyRulesArrayOperator, self).generic(args, kws)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typing/npydecl.py", line 107, in generic
E if not supported_ufunc_loop(ufunc, ufunc_loop):
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/numpy_support.py", line 226, in supported_ufunc_loop
E from .targets import ufunc_db
E SystemError: Parent module 'numba' not loaded, cannot perform relative import
E --%<-----------------------------------------------------------------
E
E File "anaconda/lib/python2.7/site-packages/poliastro/stumpff.py", line 22
E
E Failed at nopython (nopython frontend)
E Internal error at <numba.typeinfer.IntrinsicCallConstraint object at 0x11462db10>:
E --%<-----------------------------------------------------------------
E Traceback (most recent call last):
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typeinfer.py", line 114, in propagate
E constraint(typeinfer)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typeinfer.py", line 384, in __call__
E self.resolve(typeinfer, typeinfer.typevars, fnty=self.func)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typeinfer.py", line 344, in resolve
E sig = context.resolve_function_type(fnty, pos_args, kw_args)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typing/context.py", line 112, in resolve_function_type
E res = defn.apply(args, kws)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typing/templates.py", line 185, in apply
E sig = generic(args, kws)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typing/npydecl.py", line 203, in generic
E sig = super(NumpyRulesArrayOperator, self).generic(args, kws)
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/typing/npydecl.py", line 107, in generic
E if not supported_ufunc_loop(ufunc, ufunc_loop):
E File "/Users/david/anaconda/lib/python2.7/site-packages/numba/numpy_support.py", line 226, in supported_ufunc_loop
E from .targets import ufunc_db
E SystemError: Parent module 'numba' not loaded, cannot perform relative import
E --%<-----------------------------------------------------------------
E
E File "anaconda/lib/python2.7/site-packages/poliastro/stumpff.py", line 22
anaconda/lib/python2.7/site-packages/numba/compiler.py:257: TypingError
================ 5 failed, 18 passed, 19 error in 6.00 seconds =================
david-selfs-MacBook-Air:~ david$
pip freeze | grep astropy
$pip freeze | grep astropy
astropy==2.0.7
pip freeze | grep poliastro
$pip freeze | grep poliastro
poliastro==0.9.1
🎯 Goal make it work
Issue Analytics
- State:
- Created 5 years ago
- Comments:17 (10 by maintainers)
Top Results From Across the Web
How to Write an Effective Help Wanted Ad | Monster.com
Writing a professional help wanted ad can be challenging. ... Start identifying your target audience by considering the responsibilities of the job.
Read more >How to Write a Help Wanted Ad (in Any Location) - Indeed
Learn how to create and post a help wanted ad that attracts the right candidates for your open roles with templates and examples....
Read more >A Five-Week Guide to Getting a Job - Harvard Business Review
Before you even begin to look, you need to know your odds. Companies hiring top talent often spend the first few months of...
Read more >CareerOneStop: Careers and Career Information
Learn about careers, find career information, and locate career resources and advice with CareerOneStop.
Read more >Get Started | Jobs | City of New York - NYC.gov
To get one of these jobs you will need to take an exam. Some agencies post jobs and ... After you apply, the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
All references to this problem in SE were removed earlier, now all comments are removed. I consider it resolved, have flagged there for “no longer needed”.
Wow, I didn’t remember about this mess. Let me know if it works better now!