For anyone new to this error, I had this issue but it was due to using a conda environment that didn't have it installed. The fix I used was running this in a jupyter notebook!
%conda install statsmodels