I am new to python and I am trying to learn how to use it for statistics. I have been trying to use the

```python
from statsmodels.stats.weightstats import ztest

```

But I get an error when I try to use this command.
Here is what it displayed:

```none
Python 2.7.17 (default, Nov  7 2019, 10:07:09) 
[GCC 7.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from statsmodels.stats.weightstats import ztest
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jico/.local/lib/python2.7/site-packages/statsmodels/stats/__init__.py", line 1, in <module>
    from statsmodels.tools._testing import PytestTester
  File "/home/jico/.local/lib/python2.7/site-packages/statsmodels/tools/__init__.py", line 1, in <module>
    from .tools import add_constant, categorical
  File "/home/jico/.local/lib/python2.7/site-packages/statsmodels/tools/tools.py", line 8, in <module>
    from statsmodels.compat.python import lzip, lmap
  File "/home/jico/.local/lib/python2.7/site-packages/statsmodels/compat/__init__.py", line 1, in <module>
    from statsmodels.tools._testing import PytestTester
  File "/home/jico/.local/lib/python2.7/site-packages/statsmodels/tools/_testing.py", line 11, in <module>
    from statsmodels.compat.pandas import assert_equal
  File "/home/jico/.local/lib/python2.7/site-packages/statsmodels/compat/pandas.py", line 4, in <module>
    import numpy as np
  File "/home/jico/.local/lib/python2.7/site-packages/statsmodels/compat/numpy.py", line 46, in <module>
    NP_LT_114 = LooseVersion(np.__version__) < LooseVersion('1.14')
AttributeError: 'module' object has no attribute '__version__'
>>> 

```

Any help that I can get would be appreciated. I am using python 2.7.17