The root problem I have is when I try to call the test_proportions_2indep attribute of statsmodels.stats.proportion in an Anaconda Jupyter Notebook in Mac OS, I get the following error:
AttributeError: module 'statsmodels.stats.proportion' has no attribute 'test_proportions_2indep'
I'm assuming this is because Statsmodels isn't properly updated. When I call statsmodels.__version__ it says I have 0.11.1 installed in my current environment, but the version in the documentation page is 0.12.1.
I've taken the following steps:
- I removed Anaconda, deleted all relevant files, and downloaded it again. I've removed and re-installed Statsmodels.
- I've tried to update Statsmodels with the following commands in Jupyter:
! conda update statsmodels -y,! conda update statsmodels=0.12.1 -y, and! conda install -c conda-forge statsmodels. - I went through the Anaconda app and tried to remove and reinstall Statsmodels there, but ran into a situation where a bunch of different packages were going to be uninstalled, so I think my understanding of how the environment works isn't quite up to speed. I don't know if there's a solution here or not.
Finally, I gave the following command (! conda install update statsmodels==0.12.1 -y), and got a new error/response in command line:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- statsmodels==0.12.1
- update
Current channels:
- https://repo.anaconda.com/pkgs/main/osx-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/osx-64
- https://repo.anaconda.com/pkgs/r/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
Of course, the Statsmodels version is still 0.10.1.
So: 1. Do I need to get Statsmodels updated to use this attribute? and 2. How do I get it updated?