fpavogt/brutus

Brutus cannot be imported in both python2 and python3

Opened this issue · 1 comments

Dear Developer,

I cannot run brutus in either of my python versions - 2.7 and 3.7. here are the related errors -

Python3 -

import brutus
WARNING: AstropyDeprecationWarning: block_reduce was moved to the astropy.nddata.blocks module. Please update your import statement. [astropy.nddata.utils]
/mnt/md0/ranjan/Downloads/brutus-master/src/brutus.py:60: UserWarning: Faild to load brutus_ppxf. Is ppxf installed ?
warnings.warn("Faild to load brutus_ppxf. Is ppxf installed ?")
/mnt/md0/ranjan/Downloads/brutus-master/src/brutus.py:65: UserWarning: Faild to load fit_kinematic_pa. Is it installed ?
warnings.warn("Faild to load fit_kinematic_pa. Is it installed ?")
/mnt/md0/ranjan/Downloads/brutus-master/src/brutus.py:70: UserWarning: Faild to load pyqz. Is it installed ?
warnings.warn("Faild to load pyqz. Is it installed ?")
import astropy
import ppxf
import pafit
import pyqz
Traceback (most recent call last):
File "", line 1, in
File "/mnt/md0/ranjan/.local/lib/python3.7/site-packages/pyqz/init.py", line 2, in
from pyqz_metadata import version
ModuleNotFoundError: No module named 'pyqz_metadata'

PS: I must say that I have installed pyqz using pip install pyqz without any issues, but it cannot be imported. Not sure what can be done here.

Python2.7

import brutus
Traceback (most recent call last):
File "", line 1, in
File "/mnt/md0/ranjan/Downloads/brutus-master/src/brutus.py", line 48, in
import brutus_cof
File "/mnt/md0/ranjan/Downloads/brutus-master/src/brutus_cof.py", line 16, in
from statsmodels.nonparametric.smoothers_lowess import lowess
File "/mnt/md0/ranjan/.local/lib/python2.7/site-packages/statsmodels/nonparametric/init.py", line 7, in
from statsmodels.tools._testing import PytestTester
File "/mnt/md0/ranjan/.local/lib/python2.7/site-packages/statsmodels/tools/init.py", line 1, in
from .tools import add_constant, categorical
File "/mnt/md0/ranjan/.local/lib/python2.7/site-packages/statsmodels/tools/tools.py", line 8, in
from statsmodels.compat.python import lzip, lmap
File "/mnt/md0/ranjan/.local/lib/python2.7/site-packages/statsmodels/compat/init.py", line 1, in
from statsmodels.tools._testing import PytestTester
File "/mnt/md0/ranjan/.local/lib/python2.7/site-packages/statsmodels/tools/_testing.py", line 11, in
from statsmodels.compat.pandas import assert_equal
File "/mnt/md0/ranjan/.local/lib/python2.7/site-packages/statsmodels/compat/pandas.py", line 4, in
import numpy as np
File "/mnt/md0/ranjan/.local/lib/python2.7/site-packages/statsmodels/compat/numpy.py", line 46, in
NP_LT_114 = LooseVersion(np.version) < LooseVersion('1.14')
AttributeError: 'module' object has no attribute 'version'

Please help resolve these issues.

Thanks
Adarsh Ranjan
Postdoctoral Researcher,
Korea Astronomy and Space Science Institute,
Daejeon, Republic of Korea

Hi @xnaxe29,

Thanks for the interest in brutus. The bug you are seeing is linked to the underlying pyqz module (see fpavogt/pyqz#4).

Unfortunately, both pyqz and brutus are deprecated, and I do not expect to revive either of them. Instead, I would suggest that you look at brutifus and nebulabayes. The first one is the successor to brutus, and the second one superseded pyqz.

If you decide to try brutifus and encounter any trouble with it, please submit a new issue over there. I've been handing over responsibility of the code, so knowing that there are other people interested in this might help keep it operational.

(P.S.: I realize that the brutus doc is not very explicit regarding the deprecation of the code. I'll fix that in the coming days.)